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

Side by Side Diff: test/mjsunit/es6/regress/regress-468661.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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/debug-allscopes-on-debugger.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-debug-as debug 5 // Flags: --expose-debug-as debug
6 6
7 Debug = debug.Debug 7 Debug = debug.Debug
8 var exception = null; 8 var exception = null;
9 var break_count = 0; 9 var break_count = 0;
10 10
(...skipping 11 matching lines...) Expand all
22 print("Expected breaks: " + expected_breaks); 22 print("Expected breaks: " + expected_breaks);
23 } 23 }
24 var frameMirror = exec_state.frame(0); 24 var frameMirror = exec_state.frame(0);
25 25
26 var v = null;; 26 var v = null;;
27 try { 27 try {
28 v = frameMirror.evaluate('i').value(); 28 v = frameMirror.evaluate('i').value();
29 } catch(e) { 29 } catch(e) {
30 v = e; 30 v = e;
31 } 31 }
32 32 frameMirror.allScopes();
33 var source = frameMirror.sourceLineText(); 33 var source = frameMirror.sourceLineText();
34 print("paused at: " + source); 34 print("paused at: " + source);
35 assertTrue(source.indexOf("// Break " + break_count + ".") > 0, 35 assertTrue(source.indexOf("// Break " + break_count + ".") > 0,
36 "Unexpected pause at: " + source + "\n" + 36 "Unexpected pause at: " + source + "\n" +
37 "Expected: // Break " + break_count + "."); 37 "Expected: // Break " + break_count + ".");
38 if (expected_values[break_count] === ReferenceError) { 38 if (expected_values[break_count] === ReferenceError) {
39 assertTrue(v instanceof ReferenceError); 39 assertTrue(v instanceof ReferenceError);
40 } else { 40 } else {
41 assertSame(expected_values[break_count], v); 41 assertSame(expected_values[break_count], v);
42 } 42 }
(...skipping 23 matching lines...) Expand all
66 i++) { 66 i++) {
67 let key = i; // Break 4. 67 let key = i; // Break 4.
68 sum += key; // Break 5. 68 sum += key; // Break 5.
69 } 69 }
70 }()); // Break 8. 70 }()); // Break 8.
71 71
72 assertNull(exception); // Break 9. 72 assertNull(exception); // Break 9.
73 assertEquals(expected_breaks, break_count); 73 assertEquals(expected_breaks, break_count);
74 74
75 Debug.setListener(null); 75 Debug.setListener(null);
OLDNEW
« no previous file with comments | « test/mjsunit/debug-allscopes-on-debugger.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698