Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Unified Diff: src/heap/spaces.cc

Issue 2806493002: [heap] Move a few methods from spaces.h to spaces.cc (Closed)
Patch Set: add V8_EXPORT_PRIVATE annotations Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/spaces.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index c58b827368dae4c6913c9af67348d5597d2894d9..3d1aa958e53d6851b54e4e8743ad0cd40895331c 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -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) {
« no previous file with comments | « src/heap/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698