v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 3821 | skipping to change at line 3821 | |||
enum GCCallbackFlags { | enum GCCallbackFlags { | |||
kNoGCCallbackFlags = 0, | kNoGCCallbackFlags = 0, | |||
kGCCallbackFlagCompacted = 1 << 0, | kGCCallbackFlagCompacted = 1 << 0, | |||
kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 | kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 | |||
}; | }; | |||
typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); | typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); | |||
typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); | typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); | |||
typedef void (*InterruptCallback)(Isolate* isolate, void* data); | ||||
/** | /** | |||
* Collection of V8 heap information. | * Collection of V8 heap information. | |||
* | * | |||
* Instances of this class can be passed to v8::V8::HeapStatistics to | * Instances of this class can be passed to v8::V8::HeapStatistics to | |||
* get heap statistics from V8. | * get heap statistics from V8. | |||
*/ | */ | |||
class V8_EXPORT HeapStatistics { | class V8_EXPORT HeapStatistics { | |||
public: | public: | |||
HeapStatistics(); | HeapStatistics(); | |||
size_t total_heap_size() { return total_heap_size_; } | size_t total_heap_size() { return total_heap_size_; } | |||
skipping to change at line 4075 | skipping to change at line 4077 | |||
*/ | */ | |||
void AddGCEpilogueCallback( | void AddGCEpilogueCallback( | |||
GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); | GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); | |||
/** | /** | |||
* This function removes callback which was installed by | * This function removes callback which was installed by | |||
* AddGCEpilogueCallback function. | * AddGCEpilogueCallback function. | |||
*/ | */ | |||
void RemoveGCEpilogueCallback(GCEpilogueCallback callback); | void RemoveGCEpilogueCallback(GCEpilogueCallback callback); | |||
/** | ||||
* Request V8 to interrupt long running JavaScript code and invoke | ||||
* the given |callback| passing the given |data| to it. After |callback| | ||||
* returns control will be returned to the JavaScript code. | ||||
* At any given moment V8 can remember only a single callback for the ver | ||||
y | ||||
* last interrupt request. | ||||
* Can be called from another thread without acquiring a |Locker|. | ||||
* Registered |callback| must not reenter interrupted Isolate. | ||||
*/ | ||||
void RequestInterrupt(InterruptCallback callback, void* data); | ||||
/** | ||||
* Clear interrupt request created by |RequestInterrupt|. | ||||
* Can be called from another thread without acquiring a |Locker|. | ||||
*/ | ||||
void ClearInterrupt(); | ||||
private: | private: | |||
Isolate(); | Isolate(); | |||
Isolate(const Isolate&); | Isolate(const Isolate&); | |||
~Isolate(); | ~Isolate(); | |||
Isolate& operator=(const Isolate&); | Isolate& operator=(const Isolate&); | |||
void* operator new(size_t size); | void* operator new(size_t size); | |||
void operator delete(void*, size_t); | void operator delete(void*, size_t); | |||
void SetObjectGroupId(internal::Object** object, UniqueId id); | void SetObjectGroupId(internal::Object** object, UniqueId id); | |||
void SetReferenceFromGroup(UniqueId id, internal::Object** object); | void SetReferenceFromGroup(UniqueId id, internal::Object** object); | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 20 lines changed or added | |||