summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug906284.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/bug906284.js')
-rw-r--r--js/src/jit-test/tests/ion/bug906284.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/bug906284.js b/js/src/jit-test/tests/ion/bug906284.js
new file mode 100644
index 0000000000..8b7e0ea72d
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug906284.js
@@ -0,0 +1,15 @@
+"use strict"
+function f() {
+ h = {}
+}
+var c = 0;
+for (var i=0; i<3; i++) {
+ try {
+ new f();
+ assertEq(0, 1);
+ } catch(e) {
+ c++;
+ assertEq(e.message.includes("undeclared variable"), true);
+ }
+}
+assertEq(c, 3);