Commit 8ce7898d authored by jkummerow's avatar jkummerow Committed by Commit bot

[heap] Move a few methods from spaces.h to spaces.cc

To avoid the need for including list-inl.h when you include spaces.h

Review-Url: https://codereview.chromium.org/2806493002
Cr-Commit-Position: refs/heads/master@{#44481}
parent 5e78b32d
......@@ -1222,6 +1222,22 @@ STATIC_ASSERT(static_cast<ObjectSpace>(1 << AllocationSpace::CODE_SPACE) ==
STATIC_ASSERT(static_cast<ObjectSpace>(1 << AllocationSpace::MAP_SPACE) ==
ObjectSpace::kObjectSpaceMapSpace);
void Space::AddAllocationObserver(AllocationObserver* observer) {
allocation_observers_->Add(observer);
}
void Space::RemoveAllocationObserver(AllocationObserver* observer) {
bool removed = allocation_observers_->RemoveElement(observer);
USE(removed);
DCHECK(removed);
}
void Space::PauseAllocationObservers() { allocation_observers_paused_ = true; }
void Space::ResumeAllocationObservers() {
allocation_observers_paused_ = false;
}
void Space::AllocationStep(Address soon_object, int size) {
if (!allocation_observers_paused_) {
for (int i = 0; i < allocation_observers_->length(); ++i) {
......
......@@ -882,23 +882,15 @@ class Space : public Malloced {
// Identity used in error reporting.
AllocationSpace identity() { return id_; }
virtual void AddAllocationObserver(AllocationObserver* observer) {
allocation_observers_->Add(observer);
}
V8_EXPORT_PRIVATE virtual void AddAllocationObserver(
AllocationObserver* observer);
virtual void RemoveAllocationObserver(AllocationObserver* observer) {
bool removed = allocation_observers_->RemoveElement(observer);
USE(removed);
DCHECK(removed);
}
V8_EXPORT_PRIVATE virtual void RemoveAllocationObserver(
AllocationObserver* observer);
virtual void PauseAllocationObservers() {
allocation_observers_paused_ = true;
}
V8_EXPORT_PRIVATE virtual void PauseAllocationObservers();
virtual void ResumeAllocationObservers() {
allocation_observers_paused_ = false;
}
V8_EXPORT_PRIVATE virtual void ResumeAllocationObservers();
void AllocationStep(Address soon_object, int size);
......
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