Bug 820476: Allow postMessage on pending workers. r=bent
authorKyle Huey <khuey@kylehuey.com>
Fri, 14 Dec 2012 08:16:11 -0800
changeset 116033 71759cb2a7d932a1faf2e61f04f879b970449f5b
parent 116032 08f9c8a1c7e765e8ae50c32487859674754f9dc1
child 116055 9d1bb565ab3ad8df0593d1fbbe0d101116da219b
push id19702
push userkhuey@mozilla.com
push dateFri, 14 Dec 2012 16:51:37 +0000
treeherdermozilla-inbound@71759cb2a7d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs820476
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 820476: Allow postMessage on pending workers. r=bent
dom/workers/WorkerPrivate.cpp
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -2239,17 +2239,17 @@ template <class Derived>
 bool
 WorkerPrivateParent<Derived>::PostMessage(JSContext* aCx, jsval aMessage,
                                           jsval aTransferable)
 {
   AssertIsOnParentThread();
 
   {
     MutexAutoLock lock(mMutex);
-    if (mParentStatus != Running) {
+    if (mParentStatus > Running) {
       return true;
     }
   }
 
   JSStructuredCloneCallbacks* callbacks;
   if (GetParent()) {
     if (IsChromeWorker()) {
       callbacks = &gChromeWorkerStructuredCloneCallbacks;