• clemensh's avatar
    [wasm] Generate correct locations for error messages · 222541df
    clemensh authored
    The current logic in Isolate::GetLocationFromStackTrace just ignores
    wasm frames, making the computed location point to the first javascript
    frame, like this:
    
    test.js:17: RuntimeError: divide by zero
    module.exports.main();
                   ^
    RuntimeError: divide by zero
        at main (<WASM>[1]+5)
        at test.js:17:16
    
    This CL not only fixes the location to point to the top-most wasm
    frame, but also exposes to the embedder that the script of that location
    is a wasm script, allowing for custom printing of wasm locations.
    The Shell::ReportException method now checks for this flag, and prints
    wasm locations like this:
    
    <WASM>[0]+5: RuntimeError: divide by zero
    RuntimeError: divide by zero
        at main (<WASM>[0]+5)
        at test/message/wasm-trap.js:15:16
    
    R=titzer@chromium.org, yangguo@chromium.org
    BUG=chromium:613110
    
    Review-Url: https://codereview.chromium.org/2563673002
    Cr-Commit-Position: refs/heads/master@{#41640}
    222541df
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...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...