• 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...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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...
.gitignore Loading commit data...
.gn 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...
Makefile Loading commit data...
Makefile.android 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...