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

Unified Diff: runtime/include/dart_api.h

Issue 9531001: Implement weak references sets and provide an embedding API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 10 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.cc » ('j') | no next file with comments »
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 c17c6464da5aa5c7b4f6e86ee1069444350b00a7..48b4a4718b2fd9a99b13f11fc5d30b86c7ede05a 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -251,6 +251,28 @@ DART_EXPORT Dart_Handle Dart_NewWeakPersistentHandle(
*/
DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object);
+
+/**
+ * Constructs a set of weak references from the Cartesian product of
+ * the objects in the key set and the objects in values set.
+ *
+ * \param keys A set of object references. These references will be
+ * considered weak by the garbage collector.
+ * \param num_keys the number of objects in the keys set.
+ * \param values A set of object references. These references will be
+ * considered weak by garbage collector unless any object reference
+ * in 'keys' is found to be strong.
+ * \param num_values the size of the values set
+ *
+ * \return Success if the weak reference set could be created.
+ * Otherwise, returns an error handle.
+ */
+DART_EXPORT Dart_Handle Dart_NewWeakReferenceSet(Dart_Handle* keys,
+ intptr_t num_keys,
+ Dart_Handle* values,
+ intptr_t num_values);
+
+
// --- Initialization and Globals ---
/**
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698