• Benedikt Meurer's avatar
    [debug] Instantiate accessors only once. · e9873bf1
    Benedikt Meurer authored
    When retrieving an API accessor function (i.e. either the getter or the
    setter) for which the lazy accessor mechanism is used (i.e. where the
    actual JSFunction is created lazily and only the FunctionTemplateInfo)
    is around, we thus far created a fresh JSFunction every time the
    accessor function is requested, but that's observably wrong behavior,
    since the accessors are JavaScript objects with identity. We currently
    rely on the instantiation cache to guarantee identity, but there's no
    reason why we couldn't instead just put the instantiated JSFunction into
    the AccessorPair.
    
    Fixing this to only instantiate the lazy accessor pair only once, upon
    first time it's requested, coincidentally also simplifies (and fixes)
    the API accessor breakpoint machinery. This was previously lacking
    support for walking dictionary prototype objects and forcibly
    instantiating the lazy accessor pairs with break points. However, all
    this magic in the debugger is no longer necessary when we ensure that
    the lazy accessor pair component is generally only instantiated once.
    
    Bug: v8:178, v8:7596, chromium:986063, chromium:496666
    Change-Id: I41d28378010716c96c8ecf7c3f1247765f8bc669
    Fixed: chromium:1163547
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2731527Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#73163}
    e9873bf1
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
riscv64 Loading commit data...
s390 Loading commit data...
wasm/gdb-server Loading commit data...
x64 Loading commit data...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
debug-coverage.cc Loading commit data...
debug-coverage.h Loading commit data...
debug-evaluate.cc Loading commit data...
debug-evaluate.h Loading commit data...
debug-frames.cc Loading commit data...
debug-frames.h Loading commit data...
debug-interface.cc Loading commit data...
debug-interface.h Loading commit data...
debug-property-iterator.cc Loading commit data...
debug-property-iterator.h Loading commit data...
debug-scope-iterator.cc Loading commit data...
debug-scope-iterator.h Loading commit data...
debug-scopes.cc Loading commit data...
debug-scopes.h Loading commit data...
debug-stack-trace-iterator.cc Loading commit data...
debug-stack-trace-iterator.h Loading commit data...
debug-type-profile.cc Loading commit data...
debug-type-profile.h Loading commit data...
debug-wasm-objects-inl.h Loading commit data...
debug-wasm-objects.cc Loading commit data...
debug-wasm-objects.h Loading commit data...
debug-wasm-objects.tq Loading commit data...
debug.cc Loading commit data...
debug.h Loading commit data...
interface-types.h Loading commit data...
liveedit.cc Loading commit data...
liveedit.h Loading commit data...