v8/test/inspector
kozyatinskiy cb545a8c0c [inspector] change target promise for kDebugWillHandle & kDebugDidHandle
- kDebugPromiseCreated(task, parent_task)
This event occurs when promise is created (PromiseHookType::Init). V8Debugger uses this event to maintain task -> parent task map.

- kDebugEnqueueAsyncFunction(task)
This event occurs when first internal promise for async function is created. V8Debugger collects stack trace at this point.

- kDebugEnqueuePromiseResolve(task),
This event occurs when Promise fulfills with resolved status. V8Debugger collects stack trace at this point.

- kDebugEnqueuePromiseReject(task),
This event occurs when Promise fulfills with rejected status. V8Debugger collects stack trace at this point.

- kDebugPromiseCollected,
This event occurs when Promise is collected and no other chained callbacks can be added. V8Debugger removes information about async task for this promise.

- kDebugWillHandle,
This event occurs when chained promise function (either resolve or reject handler) is called. V8Debugger installs parent promise's stack (based on task -> parent_task map) as current if available or current promise's scheduled stack otherwise.

- kDebugDidHandle,
This event occurs after chained promise function has finished. V8Debugger restores asynchronous call chain to previous one.

With this change all instrumentation calls are related to current promise (before WillHandle and DidHandle were related to next async task).

Before V8Debugger supported only the following:
- asyncTaskScheduled(task1)
- asyncTaskStarted(task1)
- asyncTaskFinished(task1)

Now V8Debugger supports the following:
- asyncTaskScheduled(parent_task)
..
- asyncTaskCreated(task, parent_task),
- asyncTaskStarted(task), uses parent_task scheduled stack
- asyncTaskScheduled(task)
- asyncTaskFinished(task)

Additionally: WillHandle and DidHandle were migrated to PromiseHook API.

More details: https://docs.google.com/document/d/1u19N45f1gSF7M39mGsycJEK3IPyJgIXCBnWyiPeuJFE

BUG=v8:5738
R=dgozman@chromium.org,gsathya@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2650803003
Cr-Commit-Position: refs/heads/master@{#42644}
2017-01-25 07:05:43 +00:00
..
console Avoid using stale InspectedContext pointers 2016-10-26 20:27:12 +00:00
cpu-profiler [inspector] Make InspectorTest.sendCommand* private 2016-10-03 23:33:07 +00:00
debugger [inspector] change target promise for kDebugWillHandle & kDebugDidHandle 2017-01-25 07:05:43 +00:00
runtime [inspector] console.timeEnd formats ms in the same way as JS formats double 2017-01-17 20:21:38 +00:00
BUILD.gn Properly define v8_enable_inspector and its override in GN. 2016-11-21 19:29:38 +00:00
DEPS [inspector] introduce limit for amount of stored async stacks 2016-12-18 17:04:40 +00:00
inspector-impl.cc [inspector] console.timeEnd formats ms in the same way as JS formats double 2017-01-17 20:21:38 +00:00
inspector-impl.h [inspector] expose V8InspectorSession::breakProgram in test harness. 2017-01-18 16:57:00 +00:00
inspector-test.cc [inspector] expose V8InspectorSession::breakProgram in test harness. 2017-01-18 16:57:00 +00:00
inspector.gyp Fix inspector test in components build 2016-10-18 20:08:12 +00:00
inspector.isolate [inspector] conditionally copy files for inspector test. 2016-10-24 10:57:37 +00:00
inspector.status [wasm] Add guard regions to end of WebAssembly.Memory buffers 2016-11-17 20:29:13 +00:00
json-parse-expected.txt [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
json-parse.js [inspector] added inspector test runner [part 5] 2016-10-02 21:23:03 +00:00
OWNERS [inspector] added inspector test runner [part 1] 2016-09-30 15:52:46 +00:00
protocol-test.js [inspector] add async instrumentation for setTimeout in tests 2016-12-13 19:41:22 +00:00
task-runner.cc [inspector] add async instrumentation for setTimeout in tests 2016-12-13 19:41:22 +00:00
task-runner.h [inspector] add async instrumentation for setTimeout in tests 2016-12-13 19:41:22 +00:00
testcfg.py [inspector] added inspector test runner [part 4] 2016-10-02 19:41:28 +00:00