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

Unified Diff: runtime/include/dart_api.h

Issue 187113003: Track external allocated memory for weak persistent handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 33235)
+++ runtime/include/dart_api.h (working copy)
@@ -434,6 +434,8 @@
* \param object An object.
* \param peer A pointer to a native object or NULL. This value is
* provided to callback when it is invoked.
+ * \param external_allocation_size The number of externally allocated
+ * bytes for peer. Used to inform the garbage collector.
* \param callback A function pointer that will be invoked sometime
* after the object is garbage collected.
*
@@ -443,6 +445,7 @@
DART_EXPORT Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle(
Dart_Handle object,
void* peer,
+ intptr_t external_allocation_size,
Dart_WeakPersistentHandleFinalizer callback);
DART_EXPORT void Dart_DeleteWeakPersistentHandle(
@@ -468,6 +471,8 @@
* \param object An object.
* \param peer A pointer to a native object or NULL. This value is
* provided to callback when it is invoked.
+ * \param external_allocation_size The number of externally allocated
+ * bytes for peer. Used to inform the garbage collector.
* \param callback A function pointer that will be invoked sometime
* after the object is garbage collected.
*
@@ -477,6 +482,7 @@
DART_EXPORT Dart_WeakPersistentHandle Dart_NewPrologueWeakPersistentHandle(
Dart_Handle object,
void* peer,
+ intptr_t external_allocation_size,
Dart_WeakPersistentHandleFinalizer callback);
/**

Powered by Google App Engine
This is Rietveld 408576698