[INFER] Fix GC hazard, bug 679094.
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 15 Aug 2011 18:52:22 -0700
changeset 77437 74bfd74ca2895c602d8c3f6269b9ef8106b69723
parent 77436 0d5f119ab1722c0002c367cbf6061585eb54d65b
child 77438 427522c34b31ba8039e5a2304739986f4f9d42c8
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs679094
milestone8.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
[INFER] Fix GC hazard, bug 679094.
js/src/jsparse.cpp
--- a/js/src/jsparse.cpp
+++ b/js/src/jsparse.cpp
@@ -1108,17 +1108,17 @@ Compiler::compileScript(JSContext *cx, J
 
     script = JSScript::NewScriptFromCG(cx, &cg);
     if (!script)
         goto out;
 
     JS_ASSERT(script->savedCallerFun == savedCallerFun);
 
     {
-        AutoShapeRooter shapeRoot(cx, script->bindings.lastShape());
+        AutoScriptRooter root(cx, script);
         if (!defineGlobals(cx, globalScope, script))
             goto late_error;
     }
 
   out:
     JS_FinishArenaPool(&codePool);
     JS_FinishArenaPool(&notePool);
     Probes::compileScriptEnd(cx, script, filename, lineno);