diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/arguments/testDelArg3.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/arguments/testDelArg3.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,42 @@ +function assertGood(x) { + assertEq(x, "good"); +} + +(function() { + var a = arguments; + return function() { + assertGood.apply(null, a); + } +})("good")(); + +(function() { + var a = arguments; + return function() { + a[0] = "good"; + assertGood.apply(null, a); + } +})("bad")(); + +Object.prototype[0] = "good"; + +(function() { + var a = arguments; + return function() { + delete a[0]; + assertGood.apply(null, a); + } +})("bad")(); + +delete Object.prototype[0]; + +function assertUndefined(x) { + assertEq(x, undefined); +} + +(function() { + var a = arguments; + return function() { + a[0] = "bad"; + assertUndefined.apply(null, a); + } +})()();