Fix GC hazard, bug 679094. r=jorendorff.

This commit is contained in:
Brian Hackett 2011-08-16 06:52:44 -05:00
parent 8bd5d4a730
commit 24c7f785f6

View File

@ -1124,7 +1124,7 @@ Compiler::compileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
JS_ASSERT(script->savedCallerFun == savedCallerFun);
{
AutoShapeRooter shapeRoot(cx, script->bindings.lastShape());
AutoScriptRooter root(cx, script);
if (!defineGlobals(cx, globalScope, script))
goto late_error;
}