Speedup some slow running stack-overflow tests.
authorishell <ishell@chromium.org>
Mon, 20 Jul 2015 09:50:47 +0000 (02:50 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 20 Jul 2015 09:50:53 +0000 (09:50 +0000)
BUG=chromium:505007
LOG=N

Review URL: https://codereview.chromium.org/1238273003

Cr-Commit-Position: refs/heads/master@{#29747}

test/mjsunit/regress/regress-crbug-505007-1.js
test/mjsunit/regress/regress-crbug-505007-2.js

index 6012577..910f4a6 100644 (file)
@@ -4,11 +4,15 @@
 
 // Flags: --stack-size=100 --allow-natives-syntax
 
+var count = 0;
 function f() {
   try {
     f();
   } catch(e) {
-    %GetDebugContext();
+    if (count < 100) {
+      count++;
+      %GetDebugContext();
+    }
   }
 }
 f();
index dfa34ae..96014c8 100644 (file)
@@ -5,11 +5,16 @@
 // Flags: --stack-size=100 --allow-natives-syntax
 
 function g() {}
+
+var count = 0;
 function f() {
   try {
     f();
   } catch(e) {
-    %ExecuteInDebugContext(g);
+    if (count < 100) {
+      count++;
+      %ExecuteInDebugContext(g);
+    }
   }
 }
 f();