[wasm] Stop wasm compilation before js compilation in Isolate::Deinit

{Isolate::Deinit} waits for all created
{OptimizingCompiler::CompileTask}s to finish. However, these
CompileTasks run in the background and can be blocked by other tasks
which run in the background, e.g. WebAssembly compilation tasks. With
this CL we stop WebAssembly compilation tasks before we wait for
the {optimizingCompiler:::CompileTask}s.

R=mstarzinger@chromium.org
CC=jarin@chromium.org

Change-Id: I1549c1babdebc2e951aef5e48d0aa8130884fb7d
Reviewed-on: https://chromium-review.googlesource.com/1190302
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55429}
This commit is contained in:
Andreas Haas 2018-08-27 15:01:28 +02:00 committed by Commit Bot
parent b3d06b7ef8
commit a5f627d8ee

View File

@ -2608,14 +2608,14 @@ void Isolate::Deinit() {
debug()->Unload();
wasm_engine()->DeleteCompileJobsOnIsolate(this);
if (concurrent_recompilation_enabled()) {
optimizing_compile_dispatcher_->Stop();
delete optimizing_compile_dispatcher_;
optimizing_compile_dispatcher_ = nullptr;
}
wasm_engine()->DeleteCompileJobsOnIsolate(this);
heap_.mark_compact_collector()->EnsureSweepingCompleted();
heap_.memory_allocator()->unmapper()->EnsureUnmappingCompleted();