v8/test/inspector/console
Simon Zünd c53c20fe64 [inspector] Implement Async Stack Tagging API v2
This CL adds a new method to the `console` that is available
when DevTools is open. In TypeScript notation the API is:

```
namespace console {
  // Creates a new `Task` and associates the current async
  // stack trace with the created `Task`.
  scheduleTask(name: string): Task;
}

interface Task {
  // Executes an arbitrary payload and forwards the return value
  // back to the caller. Any async stack trace captured during
  // 'f' has the site of the corresponding `scheduleTask` as
  // its parent.
  run<T>(f: () => T): T;
}
```

The API is a saner user-facing API for our async stack trace
mechanism:
  * scheduleAsyncTask corresponds to scheduleTask
  * startAsyncTask/stopAsyncTask are called implicitly before `f`
    is executed.
  * cancelAsyncTask is called implicitly when `Task` is GC'ed

The API is behind the flag --experimental-async-stack-tagging-api

Bug: chromium:1334585
Change-Id: Ic6054279a108756caed6b4b5f2d1fe4a1bdbaf78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3776678
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81881}
2022-07-22 06:28:24 +00:00
..
clear-async-stack-on-context-reset-expected.txt [inspector] Reset the async task stack when resetting the context group 2022-05-25 10:51:23 +00:00
clear-async-stack-on-context-reset.js [inspector] Reset the async task stack when resetting the context group 2022-05-25 10:51:23 +00:00
destroy-context-during-log-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
destroy-context-during-log.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
scoped-variables-expected.txt Reland 2 ScriptContext CLs 2020-01-22 15:40:06 +00:00
scoped-variables.js [inspector] rewritten test/inspector/let-const-with-api.js 2017-08-01 15:36:02 +00:00
stack-tagging-expected.txt [inspector] Implement Async Stack Tagging API v2 2022-07-22 06:28:24 +00:00
stack-tagging.js [inspector] Implement Async Stack Tagging API v2 2022-07-22 06:28:24 +00:00