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

Unified Diff: include/v8.h

Issue 2910203002: [api] Add an API function to set the GetExternallyAllocatedMemoryInBytesCallback. (Closed)
Patch Set: comment Created 3 years, 7 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 | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index fdfb01170bc906ddd7537866f67a78059f93123a..5ff1aa741f7fdae70792e6de74b41caa7b83149a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -7147,6 +7147,17 @@ class V8_EXPORT Isolate {
*/
void RemoveGCEpilogueCallback(GCCallback callback);
+ typedef size_t (*GetExternallyAllocatedMemoryInBytesCallback)();
+
+ /**
+ * Set the callback that tells V8 how much memory is currently allocated
+ * externally of the V8 heap. Ideally this memory is somehow connected to V8
+ * objects and may get freed-up when the corresponding V8 objects get
+ * collected by a V8 garbage collection.
+ */
+ void SetGetExternallyAllocatedMemoryInBytesCallback(
+ GetExternallyAllocatedMemoryInBytesCallback callback);
+
/**
* Forcefully terminate the current thread of JavaScript execution
* in the given isolate.
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698