OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |