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

Unified Diff: runtime/include/dart_api.h

Issue 9655011: Implement prologue weak persistent handles. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: minor pre-review changes 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 | « no previous file | runtime/vm/dart_api_impl.h » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 031c5668e6e602859a2fcf3be376d323caea3c18..84d766e248084b9e4fed2c46185bf579d83be467 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -251,6 +251,30 @@ DART_EXPORT Dart_Handle Dart_NewWeakPersistentHandle(
*/
DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object);
+/**
+ * Allocates a prologue weak persistent handle for an object.
+ *
+ * Prologue weak persistent handles are similar to weak persistent
+ * handles. However, prologue weak persistent handlers are only weak
+ * when the a garbage collector chooses to invoke the prologue and
+ * epilogue callbacks.
siva 2012/03/09 21:48:41 I like the description you used in the gcl upload
cshapiro 2012/03/13 23:06:43 I replaced the comment above with the description
+ *
siva 2012/03/09 21:48:41 Documentation for parameters 'object, peer, callba
cshapiro 2012/03/13 23:06:43 Done.
+ * This handle has the lifetime of the current isolate unless it is
+ * explicitly deallocated by calling Dart_DeletePersistentHandle.
+ *
+ * Requires there to be a current isolate.
+ */
+DART_EXPORT Dart_Handle Dart_NewPrologueWeakPersistentHandle(
+ Dart_Handle object,
+ void* peer,
+ Dart_WeakPersistentHandleFinalizer callback);
+
+/**
+ * Is this object a prologue weak persistent handle?
+ *
+ * Requires there to be a current isolate.
+ */
+DART_EXPORT bool Dart_IsPrologueWeakPersistentHandle(Dart_Handle object);
/**
* Constructs a set of weak references from the Cartesian product of
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.h » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698