Commit 6525dd38 authored by Eric Holk's avatar Eric Holk Committed by Commit Bot

[wasm] Report out of memory conditions correctly for NewNativeModule

We are seeing rare crashes due to dereferencing a null pointer shortly after
calling NewNativeModule. The most likely cause is that we failed the allocation
and returned a null pointer. Now we will use V8::FatalProcessOutOfMemory so that
this gets handled correctly.

Bug: chromium:809002
Change-Id: I7e11897c4b93a1fb9eab3b5f16fb42c27e719f87
Reviewed-on: https://chromium-review.googlesource.com/905685Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51134}
parent 384a5223
......@@ -833,6 +833,7 @@ std::unique_ptr<NativeModule> WasmCodeManager::NewNativeModule(
return ret;
}
V8::FatalProcessOutOfMemory("WasmCodeManager::NewNativeModule");
return nullptr;
}
......
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