Commit 6c447496 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm] Check that the platform exists before staring a foreground task

We assume that at this point the platform always exists. If this
assumption fails we have to reconsider how we call foreground tasks from
background tasks.

R=clemensh@chromium.org

Bug: chromium:764313
Change-Id: Ic2e61adc138cdf969f5b0bdf7702e839df5846b9
Reviewed-on: https://chromium-review.googlesource.com/663717Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47983}
parent 68af366f
......@@ -2047,8 +2047,11 @@ class AsyncCompileJob::CompileTask : public CancelableTask {
void AsyncCompileJob::StartForegroundTask() {
DCHECK_EQ(0, num_pending_foreground_tasks_++);
V8::GetCurrentPlatform()->CallOnForegroundThread(
reinterpret_cast<v8::Isolate*>(isolate_), new CompileTask(this, true));
v8::Platform* platform = V8::GetCurrentPlatform();
// TODO(ahaas): This is a CHECK to debug issue 764313.
CHECK(platform);
platform->CallOnForegroundThread(reinterpret_cast<v8::Isolate*>(isolate_),
new CompileTask(this, true));
}
template <typename State, typename... Args>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment