summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_5/extensions/iterator-in-catch.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_5/extensions/iterator-in-catch.js')
-rw-r--r--js/src/tests/ecma_5/extensions/iterator-in-catch.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/tests/ecma_5/extensions/iterator-in-catch.js b/js/src/tests/ecma_5/extensions/iterator-in-catch.js
new file mode 100644
index 000000000..390b585e9
--- /dev/null
+++ b/js/src/tests/ecma_5/extensions/iterator-in-catch.js
@@ -0,0 +1,20 @@
+//Bug 350712
+
+function iterator () {
+ for (var i in []);
+}
+
+try {
+ try {
+ throw 5;
+ }
+ catch(error if iterator()) {
+ assertEq(false, true);
+ }
+}
+catch(error) {
+ assertEq(error, 5);
+}
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);