c45a214cb5
This change removes the confusing statement positions that were previously emitted for every binding identifier within both array and object destructurings. These statement positions were reported as breakable positions to the debugger front-end, and during stepping, the debugger would also stop on them. This is confusing and very different from how other expressions work (we don't emit statement positions within expressions normally). Instead we emit expression positions for the binding identifiers, which are used to construct the source positions for stack traces. As a drive by we also add the missing position (and test cases) for sub-patterns. In particular this aligns the stepping and breakpoint behavior around destructuring expressions with that of Firefox DevTools. We also remove the original test cases, introduced with https://codereview.chromium.org/1542813003 and https://codereview.chromium.org/1533313002, which were written as debugger tests, with new inspector tests that also ensure that the call positions are correct. Fixed: chromium:1368444 Bug: v8:811 Doc: http://go/chrome-devtools:destructuring-breakpoints-design Change-Id: I4d53ad059b5eede73abd01d9bc9fdf8263c55c9d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3916453 Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#83455} |
||
---|---|---|
.. | ||
console | ||
cpu-profiler | ||
debugger | ||
heap-profiler | ||
regress | ||
runtime | ||
sessions | ||
type-profiler | ||
BUILD.gn | ||
DEPS | ||
DIR_METADATA | ||
frontend-channel.h | ||
inspector-test.cc | ||
inspector.status | ||
isolate-data.cc | ||
isolate-data.h | ||
json-parse-expected.txt | ||
json-parse.js | ||
OWNERS | ||
print-method-not-found-expected.txt | ||
print-method-not-found.js | ||
protocol-test.js | ||
task-runner.cc | ||
task-runner.h | ||
tasks.cc | ||
tasks.h | ||
testcfg.py | ||
utils.cc | ||
utils.h | ||
wasm-inspector-test.js |