Bug 654073: Mark StopIteration as a class with no prototype. (r=jwalden)
This prevents infinite recursion when trying to initialize StopIteration.
This commit is contained in:
@@ -1470,6 +1470,8 @@ js_InitIteratorClasses(JSContext *cx, JSObject *obj)
|
||||
}
|
||||
#endif
|
||||
|
||||
MarkStandardClassInitializedNoProto(obj, &js_StopIterationClass);
|
||||
|
||||
return js_InitClass(cx, obj, NULL, &js_StopIterationClass, NULL, 0,
|
||||
NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user