Commit 08688f6f authored by Ali Ijaz Sheikh's avatar Ali Ijaz Sheikh Committed by Commit Bot

[heap] make {New,Paged}Space::PauseAllocationObserver more consistent

Bring the two functions closer together in implementation. Avoid
unnecessary assignment to top_on_previous_step_.

Bug: 
Change-Id: I0b6881b02ab08a48bc2051e6786e22a7b25a4948
Reviewed-on: https://chromium-review.googlesource.com/815196Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
Cr-Commit-Position: refs/heads/master@{#49944}
parent d59063b5
......@@ -2176,9 +2176,9 @@ void SpaceWithLinearArea::RemoveAllocationObserver(
void NewSpace::PauseAllocationObservers() {
// Do a step to account for memory allocated so far.
InlineAllocationStep(top(), top(), nullptr, 0);
InlineAllocationStep(top(), nullptr, nullptr, 0);
Space::PauseAllocationObservers();
top_on_previous_step_ = 0;
DCHECK_NULL(top_on_previous_step_);
UpdateInlineAllocationLimit(0);
}
......@@ -2188,7 +2188,7 @@ void PagedSpace::PauseAllocationObservers() {
// from NewSpace version.
InlineAllocationStep(top(), nullptr, nullptr, 0);
Space::PauseAllocationObservers();
top_on_previous_step_ = 0;
DCHECK_NULL(top_on_previous_step_);
}
void SpaceWithLinearArea::ResumeAllocationObservers() {
......
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