| Index: test/mjsunit/harmony/debug-async-function-async-task-event.js
|
| diff --git a/test/mjsunit/harmony/debug-async-function-async-task-event.js b/test/mjsunit/harmony/debug-async-function-async-task-event.js
|
| index 5e01938f361b6ef7ecf123cb2aecd5901cf71da0..90e13d8659a3f81856e1bdc3b8f972405f3cfe9c 100644
|
| --- a/test/mjsunit/harmony/debug-async-function-async-task-event.js
|
| +++ b/test/mjsunit/harmony/debug-async-function-async-task-event.js
|
| @@ -5,9 +5,14 @@
|
| // Flags: --harmony-async-await --expose-debug-as debug --allow-natives-syntax
|
|
|
| // The test observes the callbacks that async/await makes to the inspector
|
| -// to make accurate stack traces. The limited number of events is an
|
| -// indirect indication that we are not doing extra Promise processing that
|
| -// could be associated with memory leaks (v8:5380).
|
| +// to make accurate stack traces. The pattern is based on saving a stack once
|
| +// with enqueueRecurring and restoring it multiple times.
|
| +
|
| +// Additionally, the limited number of events is an indirect indication that
|
| +// we are not doing extra Promise processing that could be associated with memory
|
| +// leaks (v8:5380). In particular, no stacks are saved and restored for extra
|
| +// Promise handling on throwaway Promises.
|
| +
|
| // TODO(littledan): Write a test that demonstrates that the memory leak in
|
| // the exception case is fixed.
|
|
|
| @@ -16,14 +21,14 @@ Debug = debug.Debug;
|
| var base_id = -1;
|
| var exception = null;
|
| var expected = [
|
| - 'enqueue #1',
|
| + 'enqueueRecurring #1',
|
| 'willHandle #1',
|
| 'then #1',
|
| - 'enqueue #2',
|
| 'didHandle #1',
|
| - 'willHandle #2',
|
| + 'willHandle #1',
|
| 'then #2',
|
| - 'didHandle #2',
|
| + 'cancel #1',
|
| + 'didHandle #1',
|
| ];
|
|
|
| function assertLog(msg) {
|
| @@ -41,8 +46,7 @@ function listener(event, exec_state, event_data, data) {
|
| if (base_id < 0)
|
| base_id = event_data.id();
|
| var id = event_data.id() - base_id + 1;
|
| - assertTrue("Promise.resolve" == event_data.name() ||
|
| - "PromiseResolveThenableJob" == event_data.name());
|
| + assertTrue("async function" == event_data.name());
|
| assertLog(event_data.type() + " #" + id);
|
| } catch (e) {
|
| print(e + e.stack)
|
|
|