diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index c996435b7ebf..0c137a63349b 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -1666,6 +1666,9 @@ RuntimeService::UnregisterWorker(JSContext* aCx, WorkerPrivate* aWorkerPrivate) if (queuedWorker && !ScheduleWorker(aCx, queuedWorker)) { UnregisterWorker(aCx, queuedWorker); + // There's nowhere sane to report the exception from ScheduleWorker, if any, + // here. + JS_ClearPendingException(aCx); } }