| 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 |
| 5 // TODO(kozyatinskiy): fix or remove it later with new stack traces it's almost |
| 6 // imposible to hit limit. |
| 5 InspectorTest.log('Checks that we report not more then maxDepth call chains.'); | 7 InspectorTest.log('Checks that we report not more then maxDepth call chains.'); |
| 6 | 8 |
| 7 InspectorTest.addScript(` | 9 InspectorTest.addScript(` |
| 8 function promisesChain(num) { | 10 function promisesChain(num) { |
| 9 var p = Promise.resolve(); | 11 var p = Promise.resolve(); |
| 10 for (var i = 0; i < num - 1; ++i) { | 12 for (var i = 0; i < num - 1; ++i) { |
| 11 p = p.then(() => 42); | 13 p = p.then(() => 42); |
| 12 } | 14 } |
| 13 return p; | 15 return p; |
| 14 } | 16 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 70 } |
| 69 | 71 |
| 70 function dumpCaptured(stack) { | 72 function dumpCaptured(stack) { |
| 71 let count = 0; | 73 let count = 0; |
| 72 while (stack) { | 74 while (stack) { |
| 73 ++count; | 75 ++count; |
| 74 stack = stack.parent; | 76 stack = stack.parent; |
| 75 } | 77 } |
| 76 InspectorTest.log('reported: ' + count + '\n'); | 78 InspectorTest.log('reported: ' + count + '\n'); |
| 77 } | 79 } |
| OLD | NEW |