diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/delete-last-check-proto.js')
-rw-r--r-- | js/src/jit-test/tests/basic/delete-last-check-proto.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/delete-last-check-proto.js b/js/src/jit-test/tests/basic/delete-last-check-proto.js new file mode 100644 index 0000000000..5384c8e336 --- /dev/null +++ b/js/src/jit-test/tests/basic/delete-last-check-proto.js @@ -0,0 +1,8 @@ +// Test that removing a non-dictionary property does not roll back the object's +// shape to the previous one if the protos are different. + +var o = {x: 1}; +o.y = 2; +Object.setPrototypeOf(o, null); +delete o.y; +assertEq(Object.getPrototypeOf(o), null); |