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

Side by Side Diff: test/mjsunit/harmony/async-function-debug-scopes.js

Issue 2033223003: [debug] implement intuitive semantics for stepping over await call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix arm64 Created 4 years, 6 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/harmony/async-debug-step-out.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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: --harmony-async-await --expose-debug-as debug 5 // Flags: --harmony-async-await --expose-debug-as debug
6 6
7 var Debug = debug.Debug; 7 var Debug = debug.Debug;
8 8
9 var AsyncFunction = (async function() {}).constructor; 9 var AsyncFunction = (async function() {}).constructor;
10 10
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 for (var i = 0; i < scopes.length && i < length; i++) { 494 for (var i = 0; i < scopes.length && i < length; i++) {
495 var scope = fast_all_scopes[length - i - 1]; 495 var scope = fast_all_scopes[length - i - 1];
496 assertTrue(scope.isScope()); 496 assertTrue(scope.isScope());
497 assertEquals(scopes[scopes.length - i - 1], scope.scopeType()); 497 assertEquals(scopes[scopes.length - i - 1], scope.scopeType());
498 } 498 }
499 } 499 }
500 500
501 // Check that the scope chain contains the expected types of scopes. 501 // Check that the scope chain contains the expected types of scopes.
502 function CheckScopeChain(scopes, exec_state) { 502 function CheckScopeChain(scopes, exec_state) {
503 var all_scopes = exec_state.frame().allScopes(); 503 var all_scopes = exec_state.frame().allScopes();
504 assertEquals(scopes.length, exec_state.frame().scopeCount());
505 assertEquals( 504 assertEquals(
506 scopes.length, all_scopes.length, "FrameMirror.allScopes length"); 505 scopes.length, all_scopes.length, "FrameMirror.allScopes length");
507 for (var i = 0; i < scopes.length; i++) { 506 for (var i = 0; i < scopes.length; i++) {
508 var scope = exec_state.frame().scope(i); 507 var scope = exec_state.frame().scope(i);
509 assertTrue(scope.isScope()); 508 assertTrue(scope.isScope());
510 assertEquals(scopes[i], scope.scopeType()); 509 assertEquals(scopes[i], scope.scopeType());
511 assertScopeMirrorEquals(all_scopes[i], scope); 510 assertScopeMirrorEquals(all_scopes[i], scope);
512 511
513 // Check the global object when hitting the global scope. 512 // Check the global object when hitting the global scope.
514 if (scopes[i] == debug.ScopeType.Global) { 513 if (scopes[i] == debug.ScopeType.Global) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 assertTrue(response.body.object.ref < 0); 607 assertTrue(response.body.object.ref < 0);
609 } else { 608 } else {
610 assertTrue(response.body.object.ref >= 0); 609 assertTrue(response.body.object.ref >= 0);
611 } 610 }
612 var found = false; 611 var found = false;
613 for (var i = 0; i < response.refs.length && !found; i++) { 612 for (var i = 0; i < response.refs.length && !found; i++) {
614 found = response.refs[i].handle == response.body.object.ref; 613 found = response.refs[i].handle == response.body.object.ref;
615 } 614 }
616 assertTrue(found, "Scope object " + response.body.object.ref + " not found"); 615 assertTrue(found, "Scope object " + response.body.object.ref + " not found");
617 } 616 }
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/async-debug-step-out.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698