mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 879079 - Fix some static root analysis failures; r=sfink
--HG-- extra : rebase_source : 40407ff41a7380fc4107958a7e4af843c826301f
This commit is contained in:
parent
ebc01dfda0
commit
ad5df63273
@ -1698,19 +1698,19 @@ ion::CanEnter(JSContext *cx, RunState &state)
|
||||
|
||||
// If --ion-eager is used, compile with Baseline first, so that we
|
||||
// can directly enter IonMonkey.
|
||||
if (js_IonOptions.eagerCompilation && !script->hasBaselineScript()) {
|
||||
RootedScript rscript(cx, script);
|
||||
if (js_IonOptions.eagerCompilation && !rscript->hasBaselineScript()) {
|
||||
MethodStatus status = CanEnterBaselineMethod(cx, state);
|
||||
if (status != Method_Compiled)
|
||||
return status;
|
||||
}
|
||||
|
||||
// Attempt compilation. Returns Method_Compiled if already compiled.
|
||||
RootedScript rscript(cx, script);
|
||||
bool constructing = state.isInvoke() && state.asInvoke()->constructing();
|
||||
MethodStatus status = Compile(cx, rscript, NULL, NULL, constructing, SequentialExecution);
|
||||
if (status != Method_Compiled) {
|
||||
if (status == Method_CantCompile)
|
||||
ForbidCompilation(cx, script);
|
||||
ForbidCompilation(cx, rscript);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1542,7 +1542,7 @@ JSObject *
|
||||
js::CreateThisForFunctionWithProto(JSContext *cx, HandleObject callee, JSObject *proto,
|
||||
NewObjectKind newKind /* = GenericObject */)
|
||||
{
|
||||
JSObject *res;
|
||||
RootedObject res(cx);
|
||||
|
||||
if (proto) {
|
||||
RootedTypeObject type(cx, proto->getNewType(cx, &ObjectClass, &callee->as<JSFunction>()));
|
||||
|
@ -2694,7 +2694,7 @@ LambdaIsGetElem(JSContext *cx, JSObject &lambda, MutableHandleObject pobj)
|
||||
if (!lambda.is<JSFunction>())
|
||||
return true;
|
||||
|
||||
JSFunction *fun = &lambda.as<JSFunction>();
|
||||
RootedFunction fun(cx, &lambda.as<JSFunction>());
|
||||
if (!fun->isInterpreted())
|
||||
return true;
|
||||
|
||||
|
@ -283,7 +283,7 @@ JS_ALWAYS_INLINE bool
|
||||
InterpreterStack::pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args,
|
||||
HandleScript script, InitialFrameFlags initial)
|
||||
{
|
||||
JSFunction *callee = &args.callee().as<JSFunction>();
|
||||
RootedFunction callee(cx, &args.callee().as<JSFunction>());
|
||||
JS_ASSERT(regs.sp == args.end());
|
||||
JS_ASSERT(callee->nonLazyScript() == script);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user