diff --git a/js/src/jsparse.cpp b/js/src/jsparse.cpp index 43ea081f93b..dee6585a9b9 100644 --- a/js/src/jsparse.cpp +++ b/js/src/jsparse.cpp @@ -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; }