diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/cross-global-for-in.js')
-rw-r--r-- | js/src/jit-test/tests/basic/cross-global-for-in.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/cross-global-for-in.js b/js/src/jit-test/tests/basic/cross-global-for-in.js new file mode 100644 index 000000000..3fd772052 --- /dev/null +++ b/js/src/jit-test/tests/basic/cross-global-for-in.js @@ -0,0 +1,11 @@ +var global = newGlobal(); + +var arrayIter = (new global.Array())[global.Symbol.iterator](); +var ArrayIteratorPrototype = Object.getPrototypeOf(arrayIter); +var arrayIterProtoBase = Object.getPrototypeOf(ArrayIteratorPrototype); +var IteratorPrototype = arrayIterProtoBase; +delete IteratorPrototype.next; + +var obj = global.eval('({a: 1})') +for (var x in obj) {} +assertEq(x, "a"); |