| 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 3900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3911 | 3911 |
| 3912 enum GCCallbackFlags { | 3912 enum GCCallbackFlags { |
| 3913 kNoGCCallbackFlags = 0, | 3913 kNoGCCallbackFlags = 0, |
| 3914 kGCCallbackFlagCompacted = 1 << 0, | 3914 kGCCallbackFlagCompacted = 1 << 0, |
| 3915 kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 | 3915 kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 |
| 3916 }; | 3916 }; |
| 3917 | 3917 |
| 3918 typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); | 3918 typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); |
| 3919 typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); | 3919 typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); |
| 3920 | 3920 |
| 3921 typedef void (*InterruptCallback)(Isolate* isolate, void* data); |
| 3922 |
| 3921 | 3923 |
| 3922 /** | 3924 /** |
| 3923 * Collection of V8 heap information. | 3925 * Collection of V8 heap information. |
| 3924 * | 3926 * |
| 3925 * Instances of this class can be passed to v8::V8::HeapStatistics to | 3927 * Instances of this class can be passed to v8::V8::HeapStatistics to |
| 3926 * get heap statistics from V8. | 3928 * get heap statistics from V8. |
| 3927 */ | 3929 */ |
| 3928 class V8_EXPORT HeapStatistics { | 3930 class V8_EXPORT HeapStatistics { |
| 3929 public: | 3931 public: |
| 3930 HeapStatistics(); | 3932 HeapStatistics(); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4167 */ | 4169 */ |
| 4168 void AddGCEpilogueCallback( | 4170 void AddGCEpilogueCallback( |
| 4169 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); | 4171 GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); |
| 4170 | 4172 |
| 4171 /** | 4173 /** |
| 4172 * This function removes callback which was installed by | 4174 * This function removes callback which was installed by |
| 4173 * AddGCEpilogueCallback function. | 4175 * AddGCEpilogueCallback function. |
| 4174 */ | 4176 */ |
| 4175 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); | 4177 void RemoveGCEpilogueCallback(GCEpilogueCallback callback); |
| 4176 | 4178 |
| 4179 /** |
| 4180 * Request V8 to interrupt long running JavaScript code and invoke |
| 4181 * the given |callback| passing the given |data| to it. After |callback| |
| 4182 * returns control will be returned to the JavaScript code. |
| 4183 * At any given moment V8 can remember only a single callback for the very |
| 4184 * last interrupt request. |
| 4185 * Can be called from another thread without acquiring a |Locker|. |
| 4186 * Registered |callback| must not reenter interrupted Isolate. |
| 4187 */ |
| 4188 void RequestInterrupt(InterruptCallback callback, void* data); |
| 4189 |
| 4190 /** |
| 4191 * Clear interrupt request created by |RequestInterrupt|. |
| 4192 * Can be called from another thread without acquiring a |Locker|. |
| 4193 */ |
| 4194 void ClearInterrupt(); |
| 4195 |
| 4177 private: | 4196 private: |
| 4178 Isolate(); | 4197 Isolate(); |
| 4179 Isolate(const Isolate&); | 4198 Isolate(const Isolate&); |
| 4180 ~Isolate(); | 4199 ~Isolate(); |
| 4181 Isolate& operator=(const Isolate&); | 4200 Isolate& operator=(const Isolate&); |
| 4182 void* operator new(size_t size); | 4201 void* operator new(size_t size); |
| 4183 void operator delete(void*, size_t); | 4202 void operator delete(void*, size_t); |
| 4184 | 4203 |
| 4185 void SetObjectGroupId(internal::Object** object, UniqueId id); | 4204 void SetObjectGroupId(internal::Object** object, UniqueId id); |
| 4186 void SetReferenceFromGroup(UniqueId id, internal::Object** object); | 4205 void SetReferenceFromGroup(UniqueId id, internal::Object** object); |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6436 */ | 6455 */ |
| 6437 | 6456 |
| 6438 | 6457 |
| 6439 } // namespace v8 | 6458 } // namespace v8 |
| 6440 | 6459 |
| 6441 | 6460 |
| 6442 #undef TYPE_CHECK | 6461 #undef TYPE_CHECK |
| 6443 | 6462 |
| 6444 | 6463 |
| 6445 #endif // V8_H_ | 6464 #endif // V8_H_ |
| OLD | NEW |