Bug 771027 - for-of semantics: convert the result of obj.iterator() to an object. r=bhackett.

This commit is contained in:
Jason Orendorff
2012-07-19 17:03:20 -05:00
parent d808a87fb9
commit 062327a786
3 changed files with 32 additions and 1 deletions

View File

@@ -610,6 +610,9 @@ GetIterator(JSContext *cx, HandleObject obj, unsigned flags, Value *vp)
if (!Invoke(cx, ObjectOrNullValue(obj), method, 0, NULL, vp))
return false;
if (!ToObject(cx, vp))
return false;
return true;
}