blob: 11b96fd12baa08fd35d035dcd9afe1442dffd1d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Results from another compartment are correctly interpreted by for-of.
load(libdir + "iteration.js");
var g = newGlobal();
g.eval(`
var obj = {};
obj[Symbol.iterator] = function () { return this; };
obj.next = function () { return { done: true }; };
`);
for (x of g.obj)
throw 'FAIL';
|