Index: test/mjsunit/regress/regress-crbug-107996.js |
diff --git a/test/mjsunit/regress/regress-crbug-107996.js b/test/mjsunit/regress/regress-crbug-107996.js |
index dfe07e59de5ef31fca7949a90ddb06a3d0dfc70c..077c1830fd74e39ccaabb54f9618dfb33a904982 100644 |
--- a/test/mjsunit/regress/regress-crbug-107996.js |
+++ b/test/mjsunit/regress/regress-crbug-107996.js |
@@ -30,15 +30,19 @@ |
Debug = debug.Debug; |
Debug.setListener(listener); |
- |
+var exception = null; |
var fourteen; |
var four_in_debugger = []; |
function listener(event, exec_state, event_data, data) { |
if (event == Debug.DebugEvent.Break) { |
- for (var i = 0; i < exec_state.frameCount(); i++) { |
- var frame = exec_state.frame(i); |
- four_in_debugger[i] = frame.evaluate("four", false).value(); |
+ try { |
+ for (var i = 0; i < exec_state.frameCount() - 1; i++) { |
+ var frame = exec_state.frame(i); |
+ four_in_debugger[i] = frame.evaluate("four", false).value(); |
+ } |
+ } catch (e) { |
+ exception = e; |
} |
} |
} |
@@ -62,3 +66,4 @@ assertEquals(4, four_in_debugger[1]); |
assertEquals(4, four_in_debugger[2]); |
Debug.setListener(null); |
+assertNull(exception); |