Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: src/deoptimizer.cc

Issue 1052823003: Properly report OOM when deoptimizer allocation fails (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't try to GC Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index a8de06ee5850f82949b63ba1146865aba7cd3536..bcf2768bbc86256e0a13de8b16b13766ba6281d8 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -2806,7 +2806,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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698