Bug 921171 - Check for an uncaught exception when finishing off thread parsing of scripts, r=billm.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 25 Oct 2013 15:30:16 -0600
changeset 166115 2c247c354e8a08902e4f379fc641a2244047360d
parent 166114 c6a4d3416d8776755990e630227d225a81c8310d
child 166116 e61f767c0dcc65d2f7480663c55b006fe9a84937
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs921171
milestone27.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 921171 - Check for an uncaught exception when finishing off thread parsing of scripts, r=billm.
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -4542,16 +4542,21 @@ JS::CompileOffThread(JSContext *cx, Hand
 #endif
 }
 
 JS_PUBLIC_API(JSScript *)
 JS::FinishOffThreadScript(JSContext *maybecx, JSRuntime *rt, void *token)
 {
 #ifdef JS_WORKER_THREADS
     JS_ASSERT(CurrentThreadCanAccessRuntime(rt));
+
+    Maybe<AutoLastFrameCheck> lfc;
+    if (maybecx)
+        lfc.construct(maybecx);
+
     return rt->workerThreadState->finishParseTask(maybecx, rt, token);
 #else
     MOZ_ASSUME_UNREACHABLE("Off thread compilation is not available.");
 #endif
 }
 
 JS_PUBLIC_API(JSScript *)
 JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *objArg, JSPrincipals *principals,