summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug639311.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug639311.js')
-rw-r--r--js/src/jit-test/tests/basic/bug639311.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug639311.js b/js/src/jit-test/tests/basic/bug639311.js
new file mode 100644
index 0000000000..277d0c3d10
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug639311.js
@@ -0,0 +1,18 @@
+/* Avoid use-after-free while sweeping type objects. */
+
+try {
+ Reflparse("")
+} catch(e) {}
+Reflect.parse("for(var a;a;j){if(a%2==0){c()}}")
+try {
+ (function() {
+ for (a = 0;; j) {
+ gc()
+ }
+ })()
+} catch(e) {
+ delete this.Math
+}
+gc()
+Reflect.parse("{ let x; }")
+gc()