Bug 964059 - Give worker runtimes the main thread's JSRuntime as their parent, r=billm.
authorBrian Hackett <bhackett1024@gmail.com>
Fri, 07 Mar 2014 17:18:05 -0700
changeset 190844 ee403efaef7c4195147af305d0d2bd623fbce352
parent 190843 0a71fbcee972e110dc525b940ac26ad3077eb04e
child 190845 5d77cf5e90b71d38d5b3416428aea18af0714ef4
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs964059
milestone30.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 964059 - Give worker runtimes the main thread's JSRuntime as their parent, r=billm.
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -811,17 +811,17 @@ JS_GetRuntime(JSContext *cx)
 {
     return cx->runtime();
 }
 
 JS_PUBLIC_API(JSRuntime *)
 JS_GetParentRuntime(JSContext *cx)
 {
     JSRuntime *rt = cx->runtime();
-    return rt->parentRuntime ? rt->parentRuntime : nullptr;
+    return rt->parentRuntime ? rt->parentRuntime : rt;
 }
 
 JS_PUBLIC_API(JSContext *)
 JS_ContextIterator(JSRuntime *rt, JSContext **iterp)
 {
     JSContext *cx = *iterp;
     cx = cx ? cx->getNext() : rt->contextList.getFirst();
     *iterp = cx;