OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 InspectorTest.log('Checks that we collect obsolete async tasks with async stacks
.'); |
| 6 |
| 7 InspectorTest.addScript(` |
| 8 function test() { |
| 9 setMaxAsyncTaskStacks(128); |
| 10 var p = Promise.resolve(); |
| 11 |
| 12 dumpAsyncTaskStacksStateForTest(); |
| 13 setMaxAsyncTaskStacks(128); |
| 14 dumpAsyncTaskStacksStateForTest(); |
| 15 |
| 16 p.then(() => 42).then(() => 239); |
| 17 |
| 18 dumpAsyncTaskStacksStateForTest(); |
| 19 setMaxAsyncTaskStacks(128); |
| 20 dumpAsyncTaskStacksStateForTest(); |
| 21 |
| 22 setTimeout(() => 42, 0); |
| 23 |
| 24 dumpAsyncTaskStacksStateForTest(); |
| 25 setMaxAsyncTaskStacks(128); |
| 26 dumpAsyncTaskStacksStateForTest(); |
| 27 } |
| 28 `); |
| 29 |
| 30 (async function test() { |
| 31 Protocol.Debugger.enable(); |
| 32 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128}); |
| 33 await Protocol.Runtime.evaluate({expression: 'test()'}); |
| 34 InspectorTest.completeTest(); |
| 35 })() |
OLD | NEW |