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

Side by Side Diff: test/inspector/debugger/async-stack-await.js

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: avoid calling functions Created 3 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 print('Checks that async stacks works for async/await');
6
7 InspectorTest.addScript(`
8 async function foo1() {
9 debugger;
10 return Promise.resolve();
11 }
12
13 async function foo2() {
14 await Promise.resolve();
15 debugger;
16 await Promise.resolve();
17 debugger;
18 await foo1();
19 await Promise.all([ Promise.resolve() ]).then(foo1);
20 debugger;
21 }
22
23 async function test() {
24 await foo2();
25 }
26 //# sourceURL=test.js`, 7, 26);
27
28 InspectorTest.setupScriptMap();
29 Protocol.Debugger.onPaused(message => {
30 InspectorTest.logCallFrames(message.params.callFrames);
31 var asyncStackTrace = message.params.asyncStackTrace;
32 while (asyncStackTrace) {
33 InspectorTest.log(`-- ${asyncStackTrace.description} --`);
34 InspectorTest.logCallFrames(asyncStackTrace.callFrames);
35 asyncStackTrace = asyncStackTrace.parent;
36 }
37 InspectorTest.log('');
38 Protocol.Debugger.resume();
39 });
40
41 Protocol.Debugger.enable();
42 Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
43 Protocol.Runtime.evaluate({ expression: 'test()//# sourceURL=expr.js',
44 awaitPromise: true })
45 .then(InspectorTest.logMessage)
46 .then(InspectorTest.completeTest);
OLDNEW
« no previous file with comments | « test/inspector/debugger/async-promise-late-then-expected.txt ('k') | test/inspector/debugger/async-stack-await-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698