Bug 834826 - Eliminate or refactor various unnecessary stack roots, r=terrence.
This commit is contained in:
@@ -1118,7 +1118,7 @@ SuppressDeletedPropertyHelper(JSContext *cx, HandleObject obj, StringPredicate p
|
||||
RootedObject obj2(cx);
|
||||
RootedShape prop(cx);
|
||||
RootedId id(cx);
|
||||
if (!ValueToId(cx, StringValue(*idp), &id))
|
||||
if (!ValueToId<CanGC>(cx, StringValue(*idp), &id))
|
||||
return false;
|
||||
if (!JSObject::lookupGeneric(cx, proto, id, &obj2, &prop))
|
||||
return false;
|
||||
@@ -1249,7 +1249,7 @@ js_IteratorMore(JSContext *cx, HandleObject iterobj, MutableHandleValue rval)
|
||||
if (ni) {
|
||||
JS_ASSERT(!ni->isKeyIter());
|
||||
RootedId id(cx);
|
||||
if (!ValueToId(cx, StringValue(*ni->current()), &id))
|
||||
if (!ValueToId<CanGC>(cx, StringValue(*ni->current()), &id))
|
||||
return false;
|
||||
ni->incCursor();
|
||||
RootedObject obj(cx, ni->obj);
|
||||
@@ -1582,10 +1582,7 @@ SendToGenerator(JSContext *cx, JSGeneratorOp op, HandleObject obj,
|
||||
gen->regs = cx->regs();
|
||||
|
||||
cx->enterGenerator(gen); /* OOM check above. */
|
||||
|
||||
RootedScript script(cx, fp->script());
|
||||
ok = RunScript(cx, script, fp);
|
||||
|
||||
ok = RunScript(cx, fp);
|
||||
cx->leaveGenerator(gen);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user