• Simon Zünd's avatar
    [stack-trace] Use ErrorStack accessor for formatted stack traces · c8206043
    Simon Zünd authored
    When a stack trace is captured, it is stored in a private symbol on
    the respective Error object. The first access to "Error.stack"  will
    then format the stack trace, with a possible call into user JS via
    the Error.prepareStackTrace callback.
    
    Until now, the accessor converted ".stack" to a normal data
    property containing the formatted stack trace. This causes a new Map
    with a new DescriptorArray to be created, which will not be shared
    with anything else (also not other error objects with formated
    stack traces).
    
    This CL changes the accessor to store the formatted stack trace in
    the same symbol (stack_trace_symbol) as the structured data. The
    result is that an error object will have the same Map before and
    after "Error.stack" is accessed.
    
    Bug: v8:9115
    Change-Id: I7d6bf49be76d63b57fbbaf904cc6ed7dbdbfb96b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564061
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60865}
    c8206043
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer 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...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests 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...