mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1014466 - Part 2: Allow setting responseType after abort() or new open(). r=khuey
This commit is contained in:
parent
7eb4b53e72
commit
04a13e40b5
@ -279,7 +279,9 @@ private:
|
||||
bool
|
||||
WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
|
||||
{
|
||||
mXMLHttpRequestPrivate->Unpin();
|
||||
if (mXMLHttpRequestPrivate->SendInProgress()) {
|
||||
mXMLHttpRequestPrivate->Unpin();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -353,7 +355,9 @@ class LoadStartDetectionRunnable MOZ_FINAL : public nsRunnable,
|
||||
aWorkerPrivate->StopSyncLoop(mSyncLoopTarget, true);
|
||||
}
|
||||
|
||||
mXMLHttpRequestPrivate->Unpin();
|
||||
if (mXMLHttpRequestPrivate->SendInProgress()) {
|
||||
mXMLHttpRequestPrivate->Unpin();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1716,6 +1720,10 @@ XMLHttpRequest::MaybeDispatchPrematureAbortEvents(ErrorResult& aRv)
|
||||
|
||||
mProxy->mSeenLoadStart = false;
|
||||
}
|
||||
|
||||
if (mRooted) {
|
||||
Unpin();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -264,6 +264,12 @@ public:
|
||||
return mMozSystem;
|
||||
}
|
||||
|
||||
bool
|
||||
SendInProgress() const
|
||||
{
|
||||
return mRooted;
|
||||
}
|
||||
|
||||
private:
|
||||
XMLHttpRequest(WorkerPrivate* aWorkerPrivate);
|
||||
~XMLHttpRequest();
|
||||
@ -284,12 +290,6 @@ private:
|
||||
const nsAString& aEventType, bool aUploadTarget,
|
||||
ErrorResult& aRv);
|
||||
|
||||
bool
|
||||
SendInProgress() const
|
||||
{
|
||||
return mRooted;
|
||||
}
|
||||
|
||||
void
|
||||
SendInternal(const nsAString& aStringBody,
|
||||
JSAutoStructuredCloneBuffer&& aBody,
|
||||
|
Loading…
Reference in New Issue
Block a user