Bug 959012 - Clean up and separate the semantics of js_{Get,Find}Class{Prototype,Object}. r=jorendorff

This commit is contained in:
Bobby Holley
2014-01-30 07:45:16 -08:00
parent 7430a3b53c
commit e82895955c
10 changed files with 52 additions and 59 deletions

View File

@@ -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;
}