Fix an incorrect comment (r=me).
authorAndreas Gal <gal@mozilla.com>
Sun, 11 Apr 2010 20:03:04 -0700
changeset 40866 9bf9c6e72fe2acfacd996e0cabac09561a0bd6f0
parent 40865 2648a73e1e43f4db50a2cd06ad9867cd1fe8a28a
child 40867 3de0a7da3a8ec6072f7020be3b47690177b0808e
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersme
milestone1.9.3a5pre
Fix an incorrect comment (r=me).
js/src/jsiter.cpp
--- a/js/src/jsiter.cpp
+++ b/js/src/jsiter.cpp
@@ -413,19 +413,18 @@ js_ValueToIterator(JSContext *cx, uintN 
                 if ((iterobj = JS_THREAD_DATA(cx)->cachedIteratorObject) != NULL) {
                     JS_THREAD_DATA(cx)->cachedIteratorObject = NULL;
                 } else {
                     if (!(iterobj = NewObjectWithGivenProto(cx, &js_IteratorClass, NULL, NULL)))
                         return false;
                 }
             } else {
                 /*
-                 * These objects don't escape either, but we construct a
-                 * StopIteration exception based on the parent of the iterator
-                 * object, so we need the correct parent here.
+                 * These iterator objects can escape, so we have to construct
+                 * them with the proper proto and parent.
                  */
                 if (!(iterobj = NewObject(cx, &js_IteratorClass, NULL, NULL)))
                     return false;
             }
 
             /* Store in *vp to protect it from GC (callers must root vp). */
             *vp = OBJECT_TO_JSVAL(iterobj);