Bug 880697 - Root directly with a runtime in jsd_DestroyScriptHookProc. r=gabor
authorBobby Holley <bobbyholley@gmail.com>
Wed, 12 Jun 2013 14:17:55 -0700
changeset 146361 58bd67e4294a77090f941d41167642579a0d0c46
parent 146360 d775f43176c84b2fb50dc528c868a9b60daf8cf2
child 146362 c521067ed5423fbe49781ee563a5d9a5b6d2c39f
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgabor
bugs880697
milestone24.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 880697 - Root directly with a runtime in jsd_DestroyScriptHookProc. r=gabor
js/jsd/jsd_scpt.cpp
--- a/js/jsd/jsd_scpt.cpp
+++ b/js/jsd/jsd_scpt.cpp
@@ -671,17 +671,19 @@ jsd_NewScriptHookProc(
 void
 jsd_DestroyScriptHookProc( 
                 JSFreeOp    *fop,
                 JSScript    *script_,
                 void*       callerdata )
 {
     JSDScript* jsdscript = NULL;
     JSDContext* jsdc = (JSDContext*) callerdata;
-    JS::RootedScript script(jsdc->dumbContext, script_);
+    // NB: We're called during GC, so we can't push a cx. Root directly with
+    // the runtime.
+    JS::RootedScript script(jsdc->jsrt, script_);
     JSD_ScriptHookProc      hook;
     void*                   hookData;
 
     JSD_ASSERT_VALID_CONTEXT(jsdc);
 
     if( JSD_IS_DANGEROUS_THREAD(jsdc) )
         return;