Commit 997682fa authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Properly deal with OOM during committing of pooled pages

BUG=chromium:610603
LOG=N
R=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/1958403003
Cr-Commit-Position: refs/heads/master@{#36122}
parent f98caf44
......@@ -880,7 +880,9 @@ MemoryChunk* MemoryAllocator::AllocatePagePooled(SpaceType* owner) {
const Address start = reinterpret_cast<Address>(chunk);
const Address area_start = start + MemoryChunk::kObjectStartOffset;
const Address area_end = start + size;
CommitBlock(reinterpret_cast<Address>(chunk), size, NOT_EXECUTABLE);
if (!CommitBlock(reinterpret_cast<Address>(chunk), size, NOT_EXECUTABLE)) {
return nullptr;
}
base::VirtualMemory reservation(start, size);
MemoryChunk::Initialize(isolate_->heap(), start, size, area_start, area_end,
NOT_EXECUTABLE, owner, &reservation);
......
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