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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4109 matching lines...) Expand 10 before | Expand all | Expand 10 after
4120 4120
4121 typedef void (*GCPrologueCallback)(Isolate* isolate, 4121 typedef void (*GCPrologueCallback)(Isolate* isolate,
4122 GCType type, 4122 GCType type,
4123 GCCallbackFlags flags); 4123 GCCallbackFlags flags);
4124 typedef void (*GCEpilogueCallback)(Isolate* isolate, 4124 typedef void (*GCEpilogueCallback)(Isolate* isolate,
4125 GCType type, 4125 GCType type,
4126 GCCallbackFlags flags); 4126 GCCallbackFlags flags);
4127 4127
4128 /** 4128 /**
4129 * Enables the host application to receive a notification before a 4129 * Enables the host application to receive a notification before a
4130 * garbage collection. Allocations are not allowed in the 4130 * garbage collection. Allocations are allowed in the callback function,
4131 * callback function, you therefore cannot manipulate objects (set 4131 * but the callback is not re-entrant: if the allocation inside it will
4132 * or delete properties for example) since it is possible such 4132 * trigger the garbage collection, the callback won't be called again.
4133 * operations will result in the allocation of objects. It is possible 4133 * It is possible to specify the GCType filter for your callback. But it is
4134 * to specify the GCType filter for your callback. But it is not possible to 4134 * not possible to register the same callback function two times with
4135 * register the same callback function two times with different 4135 * different GCType filters.
4136 * GCType filters.
4137 */ 4136 */
4138 void AddGCPrologueCallback( 4137 void AddGCPrologueCallback(
4139 GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll); 4138 GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll);
4140 4139
4141 /** 4140 /**
4142 * This function removes callback which was installed by 4141 * This function removes callback which was installed by
4143 * AddGCPrologueCallback function. 4142 * AddGCPrologueCallback function.
4144 */ 4143 */
4145 void RemoveGCPrologueCallback(GCPrologueCallback callback); 4144 void RemoveGCPrologueCallback(GCPrologueCallback callback);
4146 4145
4147 /** 4146 /**
4148 * Enables the host application to receive a notification after a 4147 * Enables the host application to receive a notification after a
4149 * garbage collection. Allocations are not allowed in the 4148 * garbage collection. Allocations are allowed in the callback function,
4150 * callback function, you therefore cannot manipulate objects (set 4149 * but the callback is not re-entrant: if the allocation inside it will
4151 * or delete properties for example) since it is possible such 4150 * trigger the garbage collection, the callback won't be called again.
4152 * operations will result in the allocation of objects. It is possible 4151 * It is possible to specify the GCType filter for your callback. But it is
4153 * to specify the GCType filter for your callback. But it is not possible to 4152 * not possible to register the same callback function two times with
4154 * register the same callback function two times with different 4153 * different GCType filters.
4155 * GCType filters.
4156 */ 4154 */
4157 void AddGCEpilogueCallback( 4155 void AddGCEpilogueCallback(
4158 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); 4156 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll);
4159 4157
4160 /** 4158 /**
4161 * This function removes callback which was installed by 4159 * This function removes callback which was installed by
4162 * AddGCEpilogueCallback function. 4160 * AddGCEpilogueCallback function.
4163 */ 4161 */
4164 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); 4162 void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
4165 4163
(...skipping 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after
6455 */ 6453 */
6456 6454
6457 6455
6458 } // namespace v8 6456 } // namespace v8
6459 6457
6460 6458
6461 #undef TYPE_CHECK 6459 #undef TYPE_CHECK
6462 6460
6463 6461
6464 #endif // V8_H_ 6462 #endif // V8_H_
OLDNEW
« 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