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

Unified Diff: runtime/vm/scavenger.cc

Issue 197963002: Remove the ability to allow multiple gc prologue and gc epilogue callbacks (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
===================================================================
--- runtime/vm/scavenger.cc (revision 33596)
+++ runtime/vm/scavenger.cc (working copy)
@@ -377,8 +377,8 @@
void Scavenger::Prologue(Isolate* isolate, bool invoke_api_callbacks) {
- if (invoke_api_callbacks) {
- isolate->gc_prologue_callbacks().Invoke();
+ if (invoke_api_callbacks && (isolate->gc_prologue_callback() != NULL)) {
+ (isolate->gc_prologue_callback())();
}
// Flip the two semi-spaces so that to_ is always the space for allocating
// objects.
@@ -414,8 +414,8 @@
memset(from_->pointer(), 0xf3, from_->size());
#endif // defined(DEBUG)
- if (invoke_api_callbacks) {
- isolate->gc_epilogue_callbacks().Invoke();
+ if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) {
+ (isolate->gc_epilogue_callback())();
}
}
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698