diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-05 13:04:44 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-05 13:04:44 +0200 |
commit | a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca (patch) | |
tree | 24d69034f60ed1f6bf79cccfbbe05f10c26238ff /dom/workers/WorkerPrivate.cpp | |
parent | c3916ca1a0164dcb7742360a43d7ab36a80907fc (diff) | |
download | UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar.gz UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar.lz UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar.xz UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.zip |
Bug 604026 - Sync event loops in workers should be created only if compatible with the worker shutdown status
Diffstat (limited to 'dom/workers/WorkerPrivate.cpp')
-rw-r--r-- | dom/workers/WorkerPrivate.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 8848e881a..612090027 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -5446,10 +5446,18 @@ WorkerPrivate::CancelAllTimeouts() } already_AddRefed<nsIEventTarget> -WorkerPrivate::CreateNewSyncLoop() +WorkerPrivate::CreateNewSyncLoop(Status aFailStatus) { AssertIsOnWorkerThread(); + { + MutexAutoLock lock(mMutex); + + if (mStatus >= aFailStatus) { + return nullptr; + } + } + nsCOMPtr<nsIThreadInternal> thread = do_QueryInterface(NS_GetCurrentThread()); MOZ_ASSERT(thread); |