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

Unified Diff: runtime/vm/gc_marker.cc

Issue 3001343002: Remove GC prologue and epilogue callbacks. (Closed)
Patch Set: Created 3 years, 4 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/heap.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 0acd8bc76acf0774c4cfb507d55b42124f937be6..fa83333c552848e3d3f27afc371f9be441be17c6 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -447,20 +447,13 @@ class MarkingWeakVisitor : public HandleVisitor {
DISALLOW_COPY_AND_ASSIGN(MarkingWeakVisitor);
};
-void GCMarker::Prologue(Isolate* isolate, bool invoke_api_callbacks) {
- if (invoke_api_callbacks && (isolate->gc_prologue_callback() != NULL)) {
- (isolate->gc_prologue_callback())();
- }
+void GCMarker::Prologue(Isolate* isolate) {
isolate->PrepareForGC();
// The store buffers will be rebuilt as part of marking, reset them now.
isolate->store_buffer()->Reset();
}
-void GCMarker::Epilogue(Isolate* isolate, bool invoke_api_callbacks) {
- if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) {
- (isolate->gc_epilogue_callback())();
- }
-}
+void GCMarker::Epilogue(Isolate* isolate) {}
void GCMarker::IterateRoots(Isolate* isolate,
ObjectPointerVisitor* visitor,
@@ -677,9 +670,8 @@ void GCMarker::FinalizeResultsFrom(MarkingVisitorType* visitor) {
void GCMarker::MarkObjects(Isolate* isolate,
PageSpace* page_space,
- bool invoke_api_callbacks,
bool collect_code) {
- Prologue(isolate, invoke_api_callbacks);
+ Prologue(isolate);
// The API prologue/epilogue may create/destroy zones, so we must not
// depend on zone allocations surviving beyond the epilogue callback.
{
@@ -752,7 +744,7 @@ void GCMarker::MarkObjects(Isolate* isolate,
ProcessWeakTables(page_space);
ProcessObjectIdTable(isolate);
}
- Epilogue(isolate, invoke_api_callbacks);
+ Epilogue(isolate);
}
} // namespace dart
« no previous file with comments | « runtime/vm/gc_marker.h ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698