Bug 770795 - add NullPtr and associated Handle constructor (r=billm)

This commit is contained in:
Luke Wagner
2012-07-08 03:00:11 -07:00
parent 6f223b7eee
commit 46d990aa46
24 changed files with 133 additions and 194 deletions

View File

@@ -109,9 +109,15 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain, StackFrame *call
bool savedCallerFun = compileAndGo && callerFrame && callerFrame->isFunctionFrame();
GlobalObject *globalObject = needScriptGlobal ? GetCurrentGlobal(cx) : NULL;
Rooted<JSScript*> script(cx);
script = JSScript::Create(cx, savedCallerFun, principals, originPrincipals, compileAndGo,
noScriptRval, globalObject, version, staticLevel);
Rooted<JSScript*> script(cx, JSScript::Create(cx,
savedCallerFun,
principals,
originPrincipals,
compileAndGo,
noScriptRval,
globalObject,
version,
staticLevel));
if (!script)
return NULL;
@@ -267,10 +273,15 @@ frontend::CompileFunctionBody(JSContext *cx, HandleFunction fun,
return false;
GlobalObject *globalObject = fun->getParent() ? &fun->getParent()->global() : NULL;
Rooted<JSScript*> script(cx);
script = JSScript::Create(cx, /* savedCallerFun = */ false, principals, originPrincipals,
/* compileAndGo = */ false, /* noScriptRval = */ false,
globalObject, version, staticLevel);
Rooted<JSScript*> script(cx, JSScript::Create(cx,
/* savedCallerFun = */ false,
principals,
originPrincipals,
/* compileAndGo = */ false,
/* noScriptRval = */ false,
globalObject,
version,
staticLevel));
if (!script)
return false;