Bug 758509 (part 3) - Initialize JSScript::version in Create(). r=luke.

This commit is contained in:
Nicholas Nethercote
2012-05-31 06:19:22 -07:00
parent c294d4fe16
commit 7b09cf5911
7 changed files with 19 additions and 28 deletions

View File

@@ -113,7 +113,7 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
return NULL;
Rooted<JSScript*> script(cx);
script = JSScript::Create(cx, noScriptRval);
script = JSScript::Create(cx, noScriptRval, version);
if (!script)
return NULL;
@@ -243,8 +243,6 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
if (Emit1(cx, &bce, JSOP_STOP) < 0)
return NULL;
JS_ASSERT(bce.version() == version);
if (!script->fullyInitFromEmitter(cx, &bce))
return NULL;
@@ -280,7 +278,7 @@ frontend::CompileFunctionBody(JSContext *cx, JSFunction *fun,
return false;
Rooted<JSScript*> script(cx);
script = JSScript::Create(cx, /* noScriptRval = */ false);
script = JSScript::Create(cx, /* noScriptRval = */ false, version);
if (!script)
return false;