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

Side by Side Diff: test/inspector/debugger/max-async-call-chain-depth.js

Issue 2868493002: [inspector] use creation stack trace as parent for async call chains (Closed)
Patch Set: removed DCHECK for now Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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 // TODO(kozyatinskiy): fix or remove it later.
5 InspectorTest.log('Checks that we trim async call chains correctly.'); 5 InspectorTest.log('Checks that we trim async call chains correctly.');
6 6
7 Protocol.Debugger.enable(); 7 Protocol.Debugger.enable();
8 InspectorTest.log('set async chain depth to 8'); 8 InspectorTest.log('set async chain depth to 8');
9 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8}); 9 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
10 InspectorTest.runAsyncTestSuite([ 10 InspectorTest.runAsyncTestSuite([
11 async function testDebuggerPaused() { 11 async function testDebuggerPaused() {
12 runWithAsyncChain(4, 'debugger;'); 12 runWithAsyncChain(4, 'debugger;');
13 dumpAsyncChainLength(await Protocol.Debugger.oncePaused()); 13 dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
14 await Protocol.Debugger.resume(); 14 await Protocol.Debugger.resume();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 function dumpAsyncChainLength(message) { 153 function dumpAsyncChainLength(message) {
154 let stackTrace = message.params.asyncStackTrace || message.params.stackTrace.p arent; 154 let stackTrace = message.params.asyncStackTrace || message.params.stackTrace.p arent;
155 let asyncChainCount = 0; 155 let asyncChainCount = 0;
156 while (stackTrace) { 156 while (stackTrace) {
157 ++asyncChainCount; 157 ++asyncChainCount;
158 stackTrace = stackTrace.parent; 158 stackTrace = stackTrace.parent;
159 } 159 }
160 InspectorTest.log(`actual async chain len: ${asyncChainCount}`); 160 InspectorTest.log(`actual async chain len: ${asyncChainCount}`);
161 } 161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698