Bug 1072144 part 2. When UnregisterWorker tries to ScheduleWorker and that throws, just suppress the exception: there is no good place to report it anyway. r=khuey
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 01 Mar 2016 16:52:26 -0500
changeset 324722 b2fcba1890b25f62d75b2af9270c16ffe159bd74
parent 324721 e3f2469bcc50fa613c94bed4fee4790a50cdd125
child 324723 9c83fcb222d0c5d3ee0d302b7cf60af7d655bec3
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1072144
milestone47.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 1072144 part 2. When UnregisterWorker tries to ScheduleWorker and that throws, just suppress the exception: there is no good place to report it anyway. r=khuey
dom/workers/RuntimeService.cpp
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -1661,16 +1661,19 @@ RuntimeService::UnregisterWorker(JSConte
 
     if (windowArray->IsEmpty()) {
       mWindowMap.Remove(window);
     }
   }
 
   if (queuedWorker && !ScheduleWorker(aCx, queuedWorker)) {
     UnregisterWorker(aCx, queuedWorker);
+    // There's nowhere sane to report the exception from ScheduleWorker, if any,
+    // here.
+    JS_ClearPendingException(aCx);
   }
 }
 
 bool
 RuntimeService::ScheduleWorker(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
 {
   if (!aWorkerPrivate->Start()) {
     // This is ok, means that we didn't need to make a thread for this worker.