mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 999274 - Wait for the last runnable before calling ShutdownScriptLoader. r=sicking
This commit is contained in:
parent
4749f3fafb
commit
42455fcdcb
@ -781,7 +781,9 @@ ScriptExecutorRunnable::PostRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate,
|
||||
NS_IMETHODIMP
|
||||
ScriptExecutorRunnable::Cancel()
|
||||
{
|
||||
ShutdownScriptLoader(mWorkerPrivate->GetJSContext(), mWorkerPrivate, false);
|
||||
if (mLastIndex == mScriptLoader.mLoadInfos.Length() - 1) {
|
||||
ShutdownScriptLoader(mWorkerPrivate->GetJSContext(), mWorkerPrivate, false);
|
||||
}
|
||||
return MainThreadWorkerSyncRunnable::Cancel();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user