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

Side by Side Diff: test/inspector/debugger/promise-chain-when-limit-hit.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 (async function test(){ 5 (async function test(){
6 InspectorTest.log('Checks correctness of promise chains when limit hit'); 6 InspectorTest.log('Checks correctness of promise chains when limit hit');
7 await Protocol.Runtime.enable(); 7 await Protocol.Runtime.enable();
8 await Protocol.Debugger.enable(); 8 await Protocol.Debugger.enable();
9 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128}); 9 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
10 10
11 await setMaxAsyncTaskStacks(3); 11 await setMaxAsyncTaskStacks(3);
12 runWithAsyncChainPromise(3, 'console.trace()'); 12 runWithAsyncChainPromise(3, 'console.trace()');
13 InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled()); 13 InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
14 14
(...skipping 27 matching lines...) Expand all
42 Protocol.Runtime.evaluate({ 42 Protocol.Runtime.evaluate({
43 expression: `Promise.resolve()${then.repeat(len - 1)}${pause}` 43 expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
44 }); 44 });
45 } 45 }
46 46
47 async function setMaxAsyncTaskStacks(max) { 47 async function setMaxAsyncTaskStacks(max) {
48 let expression = `inspector.setMaxAsyncTaskStacks(${max})`; 48 let expression = `inspector.setMaxAsyncTaskStacks(${max})`;
49 InspectorTest.log(expression); 49 InspectorTest.log(expression);
50 await Protocol.Runtime.evaluate({expression}); 50 await Protocol.Runtime.evaluate({expression});
51 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698