Bug: https://cam.sprc.samsung.pl/browse/VDGAME-334
Change-Id: I9a3899ac5279928f94f59029622535680c34a54d
Signed-off-by: Jakub Gajownik <j.gajownik2@samsung.com>
if (FLAG_wasm_num_compilation_tasks > 0) {
auto job_handle = V8::GetCurrentPlatform()->PostJob(
TaskPriority::kUserVisible, std::move(job));
+ // When shutdown already started |PostJob| might return invalid
+ // handle. As we're already shutting down, there's no need to
+ // run compilation job.
+ if (!job_handle || !job_handle->IsValid()) {
+ return;
+ }
// Wait for completion, while contributing to the work.
job_handle->Join();