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:
Paul Biggar
2011-05-03 12:31:02 -07:00
parent 851aba348e
commit 7bb26272e4
2 changed files with 5 additions and 0 deletions

View File

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