[heap] Fix top_on_previous_step_ check in NewSpace::AllocateRaw.

See also: https://chromium-review.googlesource.com/c/v8/v8/+/738204

BUG=chromium:791582

Change-Id: Ife3acf35eeaa6fdebd5ea2fabc1678ec762b3ed3
Reviewed-on: https://chromium-review.googlesource.com/806516
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
Cr-Commit-Position: refs/heads/master@{#49873}
This commit is contained in:
Ali Ijaz Sheikh 2017-12-05 03:32:06 -08:00 committed by Commit Bot
parent 3c9a2a8fe3
commit 00a77a9f4a

View File

@ -464,8 +464,8 @@ AllocationResult NewSpace::AllocateRaw(int size_in_bytes,
AllocationAlignment alignment) {
if (top() < top_on_previous_step_) {
// Generated code decreased the top() pointer to do folded allocations
DCHECK_EQ(Page::FromAddress(top()),
Page::FromAddress(top_on_previous_step_));
DCHECK_EQ(Page::FromAllocationAreaAddress(top()),
Page::FromAllocationAreaAddress(top_on_previous_step_));
top_on_previous_step_ = top();
}
#ifdef V8_HOST_ARCH_32_BIT