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

Unified Diff: runtime/vm/dart_api_state.h

Issue 205153002: Auto delete persistent weak handles during finalization after invoking the callback associated with… (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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_state.h
===================================================================
--- runtime/vm/dart_api_state.h (revision 34199)
+++ runtime/vm/dart_api_state.h (working copy)
@@ -280,19 +280,7 @@
static void Finalize(Isolate* isolate,
FinalizablePersistentHandle* handle,
- bool is_prologue_weak) {
- Dart_WeakPersistentHandleFinalizer callback = handle->callback();
- if (callback != NULL) {
- void* peer = handle->peer();
- handle->Clear();
- Dart_WeakPersistentHandle object = is_prologue_weak ?
- handle->apiPrologueHandle() :
- handle->apiHandle();
- (*callback)(reinterpret_cast<Dart_Isolate>(isolate), object, peer);
- } else {
- handle->Clear();
- }
- }
+ bool is_prologue_weak);
// Overload the raw_ field as a next pointer when adding freed
// handles to the free list.
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698