Bug 1251369. Use an AutoJSAPI that reports its own exceptions around the main runloop in workers. r=khuey

The silly leading ": " on the error messages is due to bug 1251518.
This commit is contained in:
Boris Zbarsky
2016-02-26 15:23:13 -05:00
parent eeb98bb29d
commit 1c2e6f2f8f
8 changed files with 57 additions and 20 deletions

View File

@@ -2636,8 +2636,10 @@ WorkerThreadPrimaryRunnable::Run()
JSAutoRequest ar(cx);
mWorkerPrivate->DoRunLoop(cx);
JS_ReportPendingException(cx);
// The AutoJSAPI in DoRunLoop should have reported any exceptions left
// on cx. Note that we still need the JSAutoRequest above because
// AutoJSAPI on workers does NOT enter a request!
MOZ_ASSERT(!JS_IsExceptionPending(cx));
}
BackgroundChild::CloseForCurrentThread();