v8/test/unittests/wasm
Clemens Hammacher 3df442d738 [wasm] Keep NativeModule alive in BackgroundCompileScope
We need to ensure that the NativeModule stays alive while any
{BackgroundCompileScope} exists, because during that time we hold
shared ownership of the mutex in the {BackgroundCompileToken}. If the
{NativeModule} dies during that period, we would need to get exclusive
ownership of the mutex and deadlock.

This change requires holding a {std::weak_ptr<NativeModule>} in the
BackgroundCompileToken instead of a raw pointer, hence it can only be
initialized after the NativeModule was created. This is done via a
separate {InitCompilationState} method.

R=ahaas@chromium.org

Bug: v8:8979
Change-Id: Ia14bd272ea0bc47aec547024da6020608418c9d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1518178
Auto-Submit: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60203}
2019-03-13 08:04:04 +00:00
..
control-transfer-unittest.cc [wasm] [test] [cleanup] Add missing undefs 2017-09-11 12:09:50 +00:00
decoder-unittest.cc [ubsan] Fix numerical overflows in wasm 2019-01-10 12:24:51 +00:00
function-body-decoder-unittest.cc [wasm][test] Turn EXPECT_LENGTH macros into method 2019-02-14 16:52:03 +00:00
leb-helper-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
loop-assignment-analysis-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
module-decoder-unittest.cc [wasm] Implement passive element binary format 2019-03-04 20:05:13 +00:00
OWNERS Reduce wasm OWNERS to current team members 2018-10-15 14:47:49 +00:00
streaming-decoder-unittest.cc [wasm][streaming] Report deterministic error location 2019-03-06 17:30:48 +00:00
trap-handler-posix-unittest.cc [wasm] Implement trap handler on Windows 2018-10-30 10:25:37 +00:00
trap-handler-win-unittest.cc [wasm] Implement trap handler on Windows 2018-10-30 10:25:37 +00:00
trap-handler-x64-unittest.cc test: Replace _TEST_CASE_ with _TEST_SUITE_. 2019-02-18 21:36:56 +00:00
wasm-code-manager-unittest.cc [wasm] Keep NativeModule alive in BackgroundCompileScope 2019-03-13 08:04:04 +00:00
wasm-compiler-unittest.cc [wasm] Group anyref parameter 2018-12-12 10:45:01 +00:00
wasm-macro-gen-unittest.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
wasm-module-builder-unittest.cc Fix building with GCC 7.x and 8.x 2018-09-21 01:12:25 +00:00
wasm-opcodes-unittest.cc [wasm] [test] [cleanup] Add missing undefs 2017-09-11 12:09:50 +00:00