Bug 959012 - Clean up and separate the semantics of js_{Get,Find}Class{Prototype,Object}. r=jorendorff
This commit is contained in:
@@ -730,9 +730,9 @@ bool
|
||||
js_ThrowStopIteration(JSContext *cx)
|
||||
{
|
||||
JS_ASSERT(!JS_IsExceptionPending(cx));
|
||||
RootedValue v(cx);
|
||||
if (js_FindClassObject(cx, JSProto_StopIteration, &v))
|
||||
cx->setPendingException(v);
|
||||
RootedObject ctor(cx);
|
||||
if (js_GetClassObject(cx, JSProto_StopIteration, &ctor) && ctor)
|
||||
cx->setPendingException(ObjectValue(*ctor));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user