Commit e4a4c81e authored by Steve Blackburn's avatar Steve Blackburn Committed by Commit Bot

Move check before TPH alloc

These two checks should occur regardless of which allocator we're using,
so move them above the TPH check.

The check immediately following is V8-specific, so stays where it is.

Bug: v8:9533
Change-Id: I127e39969f4aa39ef09ff7b0fdb5ed52b535ad43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039434Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Steve Blackburn <steveblackburn@google.com>
Cr-Commit-Position: refs/heads/master@{#66150}
parent 2eb3b53d
......@@ -248,13 +248,13 @@ template <Heap::AllocationRetryMode mode>
HeapObject Heap::AllocateRawWith(int size, AllocationType allocation,
AllocationOrigin origin,
AllocationAlignment alignment) {
DCHECK(AllowHandleAllocation::IsAllowed());
DCHECK(AllowHeapAllocation::IsAllowed());
if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) {
AllocationResult result = AllocateRaw(size, allocation, origin, alignment);
DCHECK(!result.IsRetry());
return result.ToObjectChecked();
}
DCHECK(AllowHandleAllocation::IsAllowed());
DCHECK(AllowHeapAllocation::IsAllowed());
DCHECK_EQ(gc_state_, NOT_IN_GC);
Heap* heap = isolate()->heap();
Address* top = heap->NewSpaceAllocationTopAddress();
......
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