Bug 758509 (part 2) - Initialize JSScript::noScriptVal in Create(). r=luke.
This commit is contained in:
@@ -113,11 +113,11 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
|
||||
return NULL;
|
||||
|
||||
Rooted<JSScript*> script(cx);
|
||||
script = JSScript::Create(cx);
|
||||
script = JSScript::Create(cx, noScriptRval);
|
||||
if (!script)
|
||||
return NULL;
|
||||
|
||||
BytecodeEmitter bce(&parser, &sc, script, lineno, noScriptRval, needScriptGlobal);
|
||||
BytecodeEmitter bce(&parser, &sc, script, lineno, needScriptGlobal);
|
||||
if (!bce.init())
|
||||
return NULL;
|
||||
|
||||
@@ -280,12 +280,11 @@ frontend::CompileFunctionBody(JSContext *cx, JSFunction *fun,
|
||||
return false;
|
||||
|
||||
Rooted<JSScript*> script(cx);
|
||||
script = JSScript::Create(cx);
|
||||
script = JSScript::Create(cx, /* noScriptRval = */ false);
|
||||
if (!script)
|
||||
return false;
|
||||
|
||||
BytecodeEmitter funbce(&parser, &funsc, script, lineno,
|
||||
/* noScriptRval = */ false, /* needsScriptGlobal = */ false);
|
||||
BytecodeEmitter funbce(&parser, &funsc, script, lineno, /* needsScriptGlobal = */ false);
|
||||
if (!funbce.init())
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user