• Andreas Haas's avatar
    [wasm] Check the isolate if WebAssembly threads are enabled. · 1408e127
    Andreas Haas authored
    With the origin trial for WebAssembly threads, threads can be turned on
    and off by the embedder depending on the context we are currently in.
    With this CL we call the embedder callback stored on the isolate to
    determine whether threads are enabled in the current context or not.
    
    Design decision:
    I decided to extend the {WasmFeaturesFromIsolate} function to ask the
    embedder if WebAssembly threads are enabled. This is the function which
    defines dynamically which features are turned on. It would be awkward
    to have two such functions, one which calls the embedder and one which
    does not.
    A downside is that in WasmJs::Install the embedder does not seem to be
    ready to be called. That's why I changed the code there to call
    {WasmFeaturesFromFlags} instead.
    
    R=titzer@chromium.org, mstarzinger@chromium.org
    
    Bug: chromium:868844
    Change-Id: I6bfa89960a54cec71992756e3717bbb3a9fe195e
    Reviewed-on: https://chromium-review.googlesource.com/1169180
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55076}
    1408e127
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni 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...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython 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...
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...