diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/delete-all-dict-props.js')
-rw-r--r-- | js/src/jit-test/tests/basic/delete-all-dict-props.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/delete-all-dict-props.js b/js/src/jit-test/tests/basic/delete-all-dict-props.js new file mode 100644 index 0000000000..3a68a02e69 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-all-dict-props.js @@ -0,0 +1,15 @@ +function f(o) { + for (var i = 0; i < 100; i++) { + o["a" + i] = i; + } + for (var i = 0; i < 100; i++) { + delete o["a" + i]; + } + o.x = 123; + assertEq(Object.keys(o).length, 1); +} +f({}); +f([]); +let obj = newObjectWithManyReservedSlots(); +f(obj); +checkObjectWithManyReservedSlots(obj); |