bug 517795 - followup to fix the issue 512046.

This commit is contained in:
Igor Bukanov 2009-09-21 12:49:12 +04:00
parent ed88fddf07
commit 1e96fce476

View File

@ -123,6 +123,10 @@ iterator_trace(JSTracer *trc, JSObject *obj)
* simplicity.
*/
JSObject *iterable = obj->getParent();
if (!iterable) {
/* for (x in null) creates an iterator object with a null parent. */
return;
}
jsval iter_state = obj->fslots[JSSLOT_ITER_STATE];
js_MarkEnumeratorState(trc, iterable, iter_state);
}