summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug-508061.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug-508061.js')
-rw-r--r--js/src/jit-test/tests/basic/bug-508061.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug-508061.js b/js/src/jit-test/tests/basic/bug-508061.js
new file mode 100644
index 000000000..8ee45e861
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug-508061.js
@@ -0,0 +1,11 @@
+function loop() {
+ var x;
+ for (var i = 0; i < 9; i++)
+ x = {1.5: 1};
+ return x;
+}
+
+loop(); // record
+Object.prototype.__defineSetter__('1.5', function () { return 'BAD'; });
+var x = loop(); // playback
+assertEq(x["1.5"], 1); \ No newline at end of file