• Simon Zünd's avatar
    [inspector] Implement Async Stack Tagging API v2 · c53c20fe
    Simon Zünd authored
    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/+/3776678Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
    Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#81881}
    c53c20fe
Name
Last commit
Last update
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...