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

Unified Diff: test/mjsunit/debug-allscopes-on-debugger.js

Issue 1032353002: Make sure debugger is ready for breakpoins when we process 'debugger' statement. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: TODO to clean-up threading issues added Created 5 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/debug.cc ('k') | test/mjsunit/es6/regress/regress-468661.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-allscopes-on-debugger.js
diff --git a/test/mjsunit/es6/regress/regress-468661.js b/test/mjsunit/debug-allscopes-on-debugger.js
similarity index 69%
copy from test/mjsunit/es6/regress/regress-468661.js
copy to test/mjsunit/debug-allscopes-on-debugger.js
index e3886ca181f8cff8f31298d9cb33ecd058428280..f0613b2926301b9c01936702afc4f41fdb137648 100644
--- a/test/mjsunit/es6/regress/regress-468661.js
+++ b/test/mjsunit/debug-allscopes-on-debugger.js
@@ -8,9 +8,6 @@ Debug = debug.Debug
var exception = null;
var break_count = 0;
-var expected_values =
- [ReferenceError, ReferenceError, 0, 0, 0, 0, 0, 1, ReferenceError, ReferenceError];
-
function listener(event, exec_state, event_data, data) {
try {
if (event == Debug.DebugEvent.Break) {
@@ -23,23 +20,12 @@ function listener(event, exec_state, event_data, data) {
}
var frameMirror = exec_state.frame(0);
- var v = null;;
- try {
- v = frameMirror.evaluate('i').value();
- } catch(e) {
- v = e;
- }
-
+ frameMirror.allScopes();
var source = frameMirror.sourceLineText();
print("paused at: " + source);
assertTrue(source.indexOf("// Break " + break_count + ".") > 0,
"Unexpected pause at: " + source + "\n" +
"Expected: // Break " + break_count + ".");
- if (expected_values[break_count] === ReferenceError) {
- assertTrue(v instanceof ReferenceError);
- } else {
- assertSame(expected_values[break_count], v);
- }
++break_count;
if (break_count !== expected_breaks) {
@@ -60,16 +46,13 @@ var sum = 0;
'use strict';
debugger; // Break 0.
+ var i = 0; // Break 1.
+ i++; // Break 2.
+ i++; // Break 3.
+ return i; // Break 4.
+}()); // Break 5.
- for (let i=0; // Break 1.
- i < 1; // Break 2. // Break 3. // Break 6. // Break 7.
- i++) {
- let key = i; // Break 4.
- sum += key; // Break 5.
- }
-}()); // Break 8.
-
-assertNull(exception); // Break 9.
+assertNull(exception); // Break 6.
assertEquals(expected_breaks, break_count);
Debug.setListener(null);
« no previous file with comments | « src/debug.cc ('k') | test/mjsunit/es6/regress/regress-468661.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698