OLD | NEW |
---|---|
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 Loading... | |
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. |
Hannes Payer (out of office)
2014/03/14 08:57:15
a garbage collection
| |
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. |
Hannes Payer (out of office)
2014/03/14 08:57:15
a garbage collection
| |
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 Loading... | |
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_ |
OLD | NEW |