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

Unified Diff: runtime/include/dart_api.h

Issue 8984006: Implement weak persistent handles in the Dart API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix whitespace. Created 9 years 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.cc » ('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 ea89dd0d9ac278d829621915ec82392f84eb5f88..89f270d9594d2419fd8eb662b47d871c0f5cb18d 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -204,24 +204,21 @@ DART_EXPORT Dart_Handle Dart_NewPersistentHandle(Dart_Handle object);
DART_EXPORT void Dart_DeletePersistentHandle(Dart_Handle object);
/**
- * Takes a persistent handle and makes it weak.
+ * Allocates a weak persistent handle for an object.
*
- * UNIMPLEMENTED.
+ * 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_MakeWeakPersistentHandle(Dart_Handle object);
-// TODO(turnidge): Needs a "near death" callback here.
-// TODO(turnidge): Add IsWeak, Clear, etc.
+DART_EXPORT Dart_Handle Dart_NewWeakPersistentHandle(Dart_Handle object);
/**
- * Takes a weak persistent handle and makes it non-weak.
- *
- * UNIMPLEMENTED.
+ * Is this object a weak persistent handle?
*
* Requires there to be a current isolate.
*/
-DART_EXPORT Dart_Handle Dart_MakePersistentHandle(Dart_Handle object);
+DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object);
// --- Initialization and Globals ---
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698