Cope with localStorage reifying __iterator__ with null value, and the like (573875, r=gal).

This commit is contained in:
Brendan Eich
2011-01-14 08:03:45 -08:00
parent a5501a8206
commit fd669ced13
3 changed files with 25 additions and 1 deletions

View File

@@ -404,8 +404,10 @@ GetCustomIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
return false;
/* If there is no custom __iterator__ method, we are done here. */
if (vp->isUndefined())
if (!vp->isObject()) {
vp->setUndefined();
return true;
}
/* Otherwise call it and return that object. */
LeaveTrace(cx);