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

Unified Diff: runtime/include/dart_api.h

Issue 86233003: - Update documentation of Dart_NewWeakPersistentHandle. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 30638)
+++ runtime/include/dart_api.h (working copy)
@@ -409,6 +409,12 @@
* This handle has the lifetime of the current isolate unless it is
* explicitly deallocated by calling Dart_DeletePersistentHandle.
*
+ * If the object becomes unreachable the callback is invoked with the weak
+ * persistent handle and the peer as arguments. This gives the native code the
+ * ability to cleanup data associated with the object and to delete the weak
+ * persistent handle. It is illegal to call into the VM from the callback,
+ * except to delete the weak persistent handle.
+ *
* Requires there to be a current isolate.
*
* \param object An object.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698