зеркало из https://github.com/mozilla/gecko-dev.git
Bug 965309 - Stop the SyncLoop of a running sync XHR if the proxy was released before the LoadStartDetectionRunnable could run r=khuey
This commit is contained in:
Родитель
0c71819122
Коммит
0d63bc2dbc
|
@ -564,6 +564,17 @@ private:
|
|||
MainThreadRun() MOZ_OVERRIDE
|
||||
{
|
||||
mProxy->Teardown();
|
||||
|
||||
// Make sure to stop the syncLoop of a sync XHR request whose
|
||||
// worker was released while the request was still running.
|
||||
if (mProxy->mSyncLoopTarget) {
|
||||
nsRefPtr<MainThreadStopSyncLoopRunnable> runnable =
|
||||
new MainThreadStopSyncLoopRunnable(mWorkerPrivate,
|
||||
mProxy->mSyncLoopTarget.forget(),
|
||||
false);
|
||||
MOZ_ALWAYS_TRUE(runnable->Dispatch(nullptr));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
};
|
||||
|
@ -1108,6 +1119,9 @@ LoadStartDetectionRunnable::Run()
|
|||
mProxy->mWorkerPrivate = nullptr;
|
||||
mProxy->mOutstandingSendCount--;
|
||||
}
|
||||
} else {
|
||||
// The proxy was released and torn down by a SyncTeardownRunnable.
|
||||
mProxy->mWorkerPrivate = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче