Commit 90126696 authored by keishi's avatar keishi Committed by Commit bot

Check that heap collection backing reallocation happens on the same heap

BUG=591606

Review-Url: https://codereview.chromium.org/2210483002
Cr-Commit-Position: refs/heads/master@{#412500}
parent 2e4771df
......@@ -54,6 +54,7 @@ bool HeapAllocator::backingExpand(void* address, size_t newSize)
return false;
ASSERT(!state->isInGC());
ASSERT(state->isAllocationAllowed());
DCHECK_EQ(&state->heap(), &ThreadState::fromObject(address)->heap());
// FIXME: Support expand for large objects.
// Don't expand backings allocated on other threads.
......@@ -97,6 +98,7 @@ bool HeapAllocator::backingShrink(void* address, size_t quantizedCurrentSize, si
return false;
ASSERT(!state->isInGC());
ASSERT(state->isAllocationAllowed());
DCHECK_EQ(&state->heap(), &ThreadState::fromObject(address)->heap());
// FIXME: Support shrink for large objects.
// Don't shrink backings allocated on other threads.
......
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