Commit db04a5ad authored by erikcorry's avatar erikcorry Committed by Commit bot

Properly report OOM when deoptimizer allocation fails

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1052823003

Cr-Commit-Position: refs/heads/master@{#27900}
parent 6b59e1f1
......@@ -2803,7 +2803,10 @@ void Deoptimizer::EnsureCodeForDeoptimizationEntry(Isolate* isolate,
MemoryChunk* chunk = data->deopt_entry_code_[type];
CHECK(static_cast<int>(Deoptimizer::GetMaxDeoptTableSize()) >=
desc.instr_size);
chunk->CommitArea(desc.instr_size);
if (!chunk->CommitArea(desc.instr_size)) {
V8::FatalProcessOutOfMemory(
"Deoptimizer::EnsureCodeForDeoptimizationEntry");
}
CopyBytes(chunk->area_start(), desc.buffer,
static_cast<size_t>(desc.instr_size));
CpuFeatures::FlushICache(chunk->area_start(), desc.instr_size);
......
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