v8/test/inspector
Simon Zünd ec41a70e38 [inspector] Add 'canBeRestarted' flag to CallFrames when debugger pauses
Doc: https://bit.ly/revive-restart-frame
Context: https://crrev.com/c/3582395 (whole feature)

This CL adds a new optional flag `canBeRestarted` to every call frame
in Debugger.paused events. As the name suggests, the flag indicates
whether we can restart a particular frame through Debugger.restartFrame
once implemented.

We are not able to safely restart all frames:
  * We don't support WASM frames
  * We don't support frames where resumable functions (async fns,
    generators) and embedder C++ frames are between the top-most
    frame and the to-be-restarted frame.

Note that from a CDP perspective the flag doesn't actually guarantee
a successful restart. CDP clients can issue
CDP commands between the Debugger.paused event and before a user
decides to restart a frame, which can potentially mess
with the stack.

The `canBeRestarted` flag tests are folded into the
Debugger.restartFrame tests. As the feature is not yet fully
implemented we short-circuit most of the tests for now and only
run them up until the first Debugger.restartFrame call fails
(except "fails-for-resumables.js").
This means the tests exercise the `canBeRestarted` flag, but not
the restarting functionality itself.

R=bmeurer@chromium.org, kimanh@chromium.org

Bug: chromium:1303521
Change-Id: I01ab46dc3557ab8383960969fbe03e00604cc5e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3596160
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80046}
2022-04-20 12:40:34 +00:00
..
console Reland 2 ScriptContext CLs 2020-01-22 15:40:06 +00:00
cpu-profiler [maglev] Create test variant 2022-03-23 10:12:52 +00:00
debugger [inspector] Add 'canBeRestarted' flag to CallFrames when debugger pauses 2022-04-20 12:40:34 +00:00
heap-profiler Add snapshot test for JSWeakRef and FinalizationRegistry 2022-01-19 23:47:39 +00:00
regress [debug] Fix catch prediction inside async generators. 2022-02-07 17:14:05 +00:00
runtime [inspector] Add 'canBeRestarted' flag to CallFrames when debugger pauses 2022-04-20 12:40:34 +00:00
sessions [inspector] Correct location for inline scripts with sourceURL. 2021-12-29 15:39:22 +00:00
type-profiler [tests] Filter out non-existent methods in inspector tests 2020-01-17 12:21:29 +00:00
BUILD.gn Include test/inspector/regress to swarming 2021-07-29 08:00:47 +00:00
DEPS [inspector][fuzzer] Extract functionality for reuse 2020-10-28 08:37:25 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
frontend-channel.h Fix name collision of v8::internal::IsolateData 2021-08-25 08:45:53 +00:00
inspector-test.cc [inspector] Add disabled tests for 'Restart frame' 2/2 2022-04-20 06:55:35 +00:00
inspector.status [inspector] Add 'canBeRestarted' flag to CallFrames when debugger pauses 2022-04-20 12:40:34 +00:00
isolate-data.cc [inspector-test] Gracefully handle termination. 2022-03-21 12:36:59 +00:00
isolate-data.h Fix name collision of v8::internal::IsolateData 2021-08-25 08:45:53 +00:00
json-parse-expected.txt [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
json-parse.js [inspector] Refactor protocol-test.js 2017-05-19 00:35:45 +00:00
OWNERS Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
print-method-not-found-expected.txt [tests] Filter out non-existent methods in inspector tests 2020-01-17 12:21:29 +00:00
print-method-not-found.js [tests] Filter out non-existent methods in inspector tests 2020-01-17 12:21:29 +00:00
protocol-test.js [inspector] Add 'canBeRestarted' flag to CallFrames when debugger pauses 2022-04-20 12:40:34 +00:00
task-runner.cc Fix name collision of v8::internal::IsolateData 2021-08-25 08:45:53 +00:00
task-runner.h Fix name collision of v8::internal::IsolateData 2021-08-25 08:45:53 +00:00
tasks.cc Fix name collision of v8::internal::IsolateData 2021-08-25 08:45:53 +00:00
tasks.h Fix name collision of v8::internal::IsolateData 2021-08-25 08:45:53 +00:00
testcfg.py [inspector] Move restart-frame test helpers into protocol-test.js 2022-04-20 08:02:34 +00:00
utils.cc Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
utils.h Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
wasm-inspector-test.js [wasm][debug] Provide WebAssembly Table entries to DevTools 2021-05-20 09:59:09 +00:00