Index: test/mjsunit/regress/regress-crbug-222893.js |
diff --git a/test/mjsunit/regress/regress-147497.js b/test/mjsunit/regress/regress-crbug-222893.js |
similarity index 77% |
copy from test/mjsunit/regress/regress-147497.js |
copy to test/mjsunit/regress/regress-crbug-222893.js |
index 92e29d12589984b0cf34a91d7cac3479a04bfbaa..714c033df6a9057d39dedde98bd4a901ec683bdb 100644 |
--- a/test/mjsunit/regress/regress-147497.js |
+++ b/test/mjsunit/regress/regress-crbug-222893.js |
@@ -27,19 +27,33 @@ |
// Flags: --expose-debug-as debug |
-Debug = debug.Debug; |
+Debug = debug.Debug |
+ |
+var error = null; |
+var array = ["a", "b", "c"]; |
function listener(event, exec_state, event_data, data) { |
- if (event == Debug.DebugEvent.Break) { |
- exec_state.prepareStep(Debug.StepAction.StepNext, 10); |
+ try { |
+ if (event == Debug.DebugEvent.Break) { |
+ assertArrayEquals(array, |
+ exec_state.frame(0).evaluate('arguments').value()); |
+ } |
+ } catch (e) { |
+ error = e; |
} |
}; |
Debug.setListener(listener); |
-var statement = ""; |
-for (var i = 0; i < 1024; i++) statement += "z"; |
-statement = 'with(0)' + statement + '=function foo(){}'; |
-debugger; |
-eval(statement); |
+(function(a, b) { |
+ arguments; |
+ debugger; // Arguments is already materialized. |
+}).apply(this, array); |
+assertNull(error); |
+ |
+(function(a, b) { |
+ debugger; // Arguments is not yet materialized. |
+}).apply(this, array); |
+assertNull(error); |
+ |