OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 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 | 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 // Flags: --harmony-async-await --expose-debug-as debug --allow-natives-syntax | 5 // Flags: --harmony-async-await |
6 | 6 |
7 // The test observes the callbacks that async/await makes to the inspector | 7 // The test observes the callbacks that async/await makes to the inspector |
8 // to make accurate stack traces. The pattern is based on saving a stack once | 8 // to make accurate stack traces. The pattern is based on saving a stack once |
9 // with enqueueRecurring and restoring it multiple times. | 9 // with enqueueRecurring and restoring it multiple times. |
10 | 10 |
11 // Additionally, the limited number of events is an indirect indication that | 11 // Additionally, the limited number of events is an indirect indication that |
12 // we are not doing extra Promise processing that could be associated with memor
y | 12 // we are not doing extra Promise processing that could be associated with memor
y |
13 // leaks (v8:5380). In particular, no stacks are saved and restored for extra | 13 // leaks (v8:5380). In particular, no stacks are saved and restored for extra |
14 // Promise handling on throwaway Promises. | 14 // Promise handling on throwaway Promises. |
15 | 15 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 confused(); | 88 confused(); |
89 | 89 |
90 Promise.resolve().then(() => { | 90 Promise.resolve().then(() => { |
91 Debug.setListener(listener); | 91 Debug.setListener(listener); |
92 Debug.setBreakOnUncaughtException(); | 92 Debug.setBreakOnUncaughtException(); |
93 resolve(); | 93 resolve(); |
94 }); | 94 }); |
95 | 95 |
96 %RunMicrotasks(); | 96 %RunMicrotasks(); |
97 assertNull(exception); | 97 assertNull(exception); |
OLD | NEW |