• Sathya Gunasekaran's avatar
    [Class] Fix debug scope iteration for class fields · 230dd86c
    Sathya Gunasekaran authored
    When trying to print the scope information for the class fields
    initializer function, the debugger asks the parser to parse the class
    literal as a function literal (to get the scope info) ... which
    doesn't quite work.
    
    Instead of adding support for parsing the class literal, we just short
    cicruit this parsing step by just returning an empty context.
    
    This works fine because initializer function doesn't have any
    variables in it's local scope.
    
    The one caveat is that the objects in the scope above this function
    (like the global) are now missing. This trade off is possibly fine
    for now, as adding parsing support for class literal to only produce
    would be a lot of code for not enough use.
    
    As a follow up to this change, the devtools UI needs to be updated to
    handle this empty context cleanly. Currently, it doesn't show the
    `this` object if no context exists even if the `this` object is
    correctly passed to the UI from the backend.
    
    Bug: v8:5367, v8:8122
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: I52965f26241bbf6abdc988783aa0fc44bb36901f
    Reviewed-on: https://chromium-review.googlesource.com/c/1274268
    Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56611}
    230dd86c
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...