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

Unified Diff: include/v8.h

Issue 177243012: heap: allow allocation in gc prologue/epilogue (Closed) Base URL: gh:v8/v8@master
Patch Set: fixes Created 6 years, 9 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/heap.h » ('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 dd8f2685bc37115638f5332ddbefd42a79c16cea..6b7b6dfaab97ae824886b3872a09230f64dcbec9 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4127,13 +4127,12 @@ class V8_EXPORT Isolate {
/**
* Enables the host application to receive a notification before a
- * garbage collection. Allocations are not allowed in the
- * callback function, you therefore cannot manipulate objects (set
- * or delete properties for example) since it is possible such
- * operations will result in the allocation of objects. It is possible
- * to specify the GCType filter for your callback. But it is not possible to
- * register the same callback function two times with different
- * GCType filters.
+ * garbage collection. Allocations are allowed in the callback function,
+ * but the callback is not re-entrant: if the allocation inside it will
+ * trigger the garbage collection, the callback won't be called again.
+ * It is possible to specify the GCType filter for your callback. But it is
+ * not possible to register the same callback function two times with
+ * different GCType filters.
*/
void AddGCPrologueCallback(
GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll);
@@ -4146,13 +4145,12 @@ class V8_EXPORT Isolate {
/**
* Enables the host application to receive a notification after a
- * garbage collection. Allocations are not allowed in the
- * callback function, you therefore cannot manipulate objects (set
- * or delete properties for example) since it is possible such
- * operations will result in the allocation of objects. It is possible
- * to specify the GCType filter for your callback. But it is not possible to
- * register the same callback function two times with different
- * GCType filters.
+ * garbage collection. Allocations are allowed in the callback function,
+ * but the callback is not re-entrant: if the allocation inside it will
+ * trigger the garbage collection, the callback won't be called again.
+ * It is possible to specify the GCType filter for your callback. But it is
+ * not possible to register the same callback function two times with
+ * different GCType filters.
*/
void AddGCEpilogueCallback(
GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll);
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698