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

Unified Diff: runtime/vm/gc_marker.cc

Issue 9605033: Implement a garbage collection prologue and epilogue callback mechanism. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix grammar Created 8 years, 9 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 | « runtime/vm/gc_marker.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/gc_marker.cc
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index f2c2a07bc55f32fa6f2f79dcf62bd7908750ffc6..ec93fe49e034c959f42dcfbfdbc3609e07d66e8e 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -219,7 +219,14 @@ class MarkingWeakVisitor : public HandleVisitor {
void GCMarker::Prologue(Isolate* isolate) {
- // Nothing to do at the moment.
+ // Always invoke the prologue callbacks.
+ isolate->gc_prologue_callbacks().Invoke();
+}
+
+
+void GCMarker::Epilogue(Isolate* isolate) {
+ // Always invoke the epilogue callbacks.
+ isolate->gc_epilogue_callbacks().Invoke();
}
@@ -305,6 +312,7 @@ void GCMarker::MarkObjects(Isolate* isolate, PageSpace* page_space) {
IterateWeakReferences(isolate, &mark);
MarkingWeakVisitor mark_weak;
IterateWeakRoots(isolate, &mark_weak);
+ Epilogue(isolate);
}
} // namespace dart
« no previous file with comments | « runtime/vm/gc_marker.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698