diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/initarrayelem-hole-value.js')
-rw-r--r-- | js/src/jit-test/tests/debug/initarrayelem-hole-value.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/initarrayelem-hole-value.js b/js/src/jit-test/tests/debug/initarrayelem-hole-value.js new file mode 100644 index 0000000000..65629e862c --- /dev/null +++ b/js/src/jit-test/tests/debug/initarrayelem-hole-value.js @@ -0,0 +1,12 @@ +var g = newGlobal({newCompartment: true}); +g.parent = this; +g.evaluate(`var dbg = new Debugger(parent); dbg.onEnterFrame = function(){};`); + +function f() { + for (var i = 0; i < 10; i++) { + var arr = [1, 2, , i]; + assertEq(2 in arr, false); + assertEq(3 in arr, true); + } +} +f(); |