summaryrefslogtreecommitdiff
path: root/deps/v8/src/heap/new-spaces-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/heap/new-spaces-inl.h')
-rw-r--r--deps/v8/src/heap/new-spaces-inl.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/deps/v8/src/heap/new-spaces-inl.h b/deps/v8/src/heap/new-spaces-inl.h
index 14c6753804..63969f86fe 100644
--- a/deps/v8/src/heap/new-spaces-inl.h
+++ b/deps/v8/src/heap/new-spaces-inl.h
@@ -94,7 +94,7 @@ V8_INLINE bool SemiSpaceNewSpace::EnsureAllocation(
}
DCHECK(old_top + aligned_size_in_bytes <= high);
- UpdateInlineAllocationLimit(aligned_size_in_bytes);
+ UpdateInlineAllocationLimitForAllocation(aligned_size_in_bytes);
DCHECK_EQ(allocation_info_.start(), allocation_info_.top());
DCHECK_SEMISPACE_ALLOCATION_INFO(allocation_info_, to_space_);
return true;
@@ -108,8 +108,11 @@ V8_INLINE bool PagedSpaceForNewSpace::EnsureAllocation(
int* out_max_aligned_size) {
if (!PagedSpaceBase::EnsureAllocation(size_in_bytes, alignment, origin,
out_max_aligned_size)) {
- return false;
+ if (!AddPageBeyondCapacity(size_in_bytes, origin)) {
+ return false;
+ }
}
+
allocated_linear_areas_ += limit() - top();
return true;
}