Bug 718311. r=mrbkap.
authorBen Turner <bent.mozilla@gmail.com>
Tue, 17 Jan 2012 12:06:10 -0800
changeset 84770 04890cad686c7ab392a27a7db897b18cbe269682
parent 84769 7080b6f34d32d71d3cdd2bc4fb5695d5e550e5f2
child 84771 095649e65552b1ab61c63d81539f8b295effda42
push id21873
push usermlamouri@mozilla.com
push dateWed, 18 Jan 2012 10:29:07 +0000
treeherdermozilla-central@7538f4d4697c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs718311
milestone12.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 718311. r=mrbkap.
dom/workers/WorkerScope.cpp
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -312,16 +312,21 @@ private:
       return false;
     }
 
     jsval adaptor;
     if (!scope->GetEventListenerOnEventTarget(aCx, name + 2, &adaptor)) {
       return false;
     }
 
+    if (JSVAL_IS_VOID(adaptor)) {
+      *aVp = JSVAL_NULL;
+      return true;
+    }
+
     JS_ASSERT(JSVAL_IS_OBJECT(adaptor));
 
     jsval listener = js::GetFunctionNativeReserved(JSVAL_TO_OBJECT(adaptor),
                                                    SLOT_wrappedFunction);
 
     *aVp = listener;
     return true;
   }