• Benedikt Meurer's avatar
    [debug] Hold on to promises weakly from the debugger's promise stack. · 3eb6b7ac
    Benedikt Meurer authored
    The debugger maintains a stack of promises used for catch prediction
    with promise builtins and async functions. Previously this stack would
    hold on to the individual promises strongly, and subtle bugs that lead
    to not properly cleaning up the stack in some corner cases would often
    lead to significant memory issues (e.g. leaking whole iframes).
    
    This refactors the PromiseOnStack to be
    
      (a) on the V8 heap, rather than allocating C++ structs with global
          handles pointing to the promises, and
      (b) hold on to the promises only weakly.
    
    While this will not guarantee proper promise stack management, it will
    at least ensure that edge cases don't lead to catastrophic (debugger
    only) leaks.
    
    Bug: chromium:1292063
    Change-Id: I9c293ca2032de3a59e1e9624f132d37187805567
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3545176
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#79594}
    3eb6b7ac
Name
Last commit
Last update
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...