mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1091002 - Drop loadend event to worker thread XHR if it's triggered by abort event from worker. r=khuey
This commit is contained in:
parent
da637fb319
commit
c4e40ad333
@ -1279,6 +1279,10 @@ EventRunnable::WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
|
|||||||
mProxy->mSeenUploadLoadStart = false;
|
mProxy->mSeenUploadLoadStart = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (!mProxy->mSeenLoadStart) {
|
||||||
|
// We've already dispatched premature abort events.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
mProxy->mSeenLoadStart = false;
|
mProxy->mSeenLoadStart = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2404,7 +2408,9 @@ XMLHttpRequest::UpdateState(const StateData& aStateData,
|
|||||||
bool aUseCachedArrayBufferResponse)
|
bool aUseCachedArrayBufferResponse)
|
||||||
{
|
{
|
||||||
if (aUseCachedArrayBufferResponse) {
|
if (aUseCachedArrayBufferResponse) {
|
||||||
MOZ_ASSERT(JS_IsArrayBufferObject(mStateData.mResponse.toObjectOrNull()));
|
MOZ_ASSERT(mStateData.mResponse.isObject() &&
|
||||||
|
JS_IsArrayBufferObject(&mStateData.mResponse.toObject()));
|
||||||
|
|
||||||
JS::Rooted<JS::Value> response(mWorkerPrivate->GetJSContext(),
|
JS::Rooted<JS::Value> response(mWorkerPrivate->GetJSContext(),
|
||||||
mStateData.mResponse);
|
mStateData.mResponse);
|
||||||
mStateData = aStateData;
|
mStateData = aStateData;
|
||||||
|
Loading…
Reference in New Issue
Block a user