Bug 670071 - make Invoke + InvokeArgsGuard less error prone (r=waldo)
This commit is contained in:
@@ -362,7 +362,7 @@ GetCustomIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
|
||||
/* Otherwise call it and return that object. */
|
||||
LeaveTrace(cx);
|
||||
Value arg = BooleanValue((flags & JSITER_FOREACH) == 0);
|
||||
if (!ExternalInvoke(cx, ObjectValue(*obj), *vp, 1, &arg, vp))
|
||||
if (!Invoke(cx, ObjectValue(*obj), *vp, 1, &arg, vp))
|
||||
return false;
|
||||
if (vp->isPrimitive()) {
|
||||
/*
|
||||
@@ -954,7 +954,7 @@ js_IteratorMore(JSContext *cx, JSObject *iterobj, Value *rval)
|
||||
jsid id = ATOM_TO_JSID(cx->runtime->atomState.nextAtom);
|
||||
if (!js_GetMethod(cx, iterobj, id, JSGET_METHOD_BARRIER, rval))
|
||||
return false;
|
||||
if (!ExternalInvoke(cx, ObjectValue(*iterobj), *rval, 0, NULL, rval)) {
|
||||
if (!Invoke(cx, ObjectValue(*iterobj), *rval, 0, NULL, rval)) {
|
||||
/* Check for StopIteration. */
|
||||
if (!cx->isExceptionPending() || !js_ValueIsStopIteration(cx->getPendingException()))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user