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

Unified Diff: runtime/vm/dart_api_impl.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/include/dart_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 9b83543416b0533da26a5c3cd31e2d014e90c0b1..6347cc98683a3a15975e4e051052af1ef25d2366 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1022,48 +1022,6 @@ DART_EXPORT void Dart_DeleteWeakPersistentHandle(
state->weak_persistent_handles().FreeHandle(weak_ref);
}
-// --- Garbage Collection Callbacks --
-
-DART_EXPORT Dart_Handle
-Dart_SetGcCallbacks(Dart_GcPrologueCallback prologue_callback,
- Dart_GcEpilogueCallback epilogue_callback) {
- Thread* thread = Thread::Current();
- Isolate* isolate = thread->isolate();
- CHECK_ISOLATE(isolate);
- DARTSCOPE(thread);
- if (prologue_callback != NULL) {
- if (isolate->gc_prologue_callback() != NULL) {
- return Api::NewError(
- "%s permits only one gc prologue callback to be registered, please "
- "remove the existing callback and then add this callback",
- CURRENT_FUNC);
- }
- } else {
- if (isolate->gc_prologue_callback() == NULL) {
- return Api::NewError(
- "%s expects 'prologue_callback' to be present in the callback set.",
- CURRENT_FUNC);
- }
- }
- if (epilogue_callback != NULL) {
- if (isolate->gc_epilogue_callback() != NULL) {
- return Api::NewError(
- "%s permits only one gc epilogue callback to be registered, please "
- "remove the existing callback and then add this callback",
- CURRENT_FUNC);
- }
- } else {
- if (isolate->gc_epilogue_callback() == NULL) {
- return Api::NewError(
- "%s expects 'epilogue_callback' to be present in the callback set.",
- CURRENT_FUNC);
- }
- }
- isolate->set_gc_prologue_callback(prologue_callback);
- isolate->set_gc_epilogue_callback(epilogue_callback);
- return Api::Success();
-}
-
// --- Initialization and Globals ---
DART_EXPORT const char* Dart_VersionString() {
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698