Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: test/mjsunit/regress/regress-crbug-222893.js

Issue 12674027: Correctly materialize arguments object in Runtime_DebugEvaluate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698