v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 2100 | skipping to change at line 2100 | |||
typedef void (*AddHistogramSampleCallback)(void* histogram, int sample); | typedef void (*AddHistogramSampleCallback)(void* histogram, int sample); | |||
// --- F a i l e d A c c e s s C h e c k C a l l b a c k --- | // --- F a i l e d A c c e s s C h e c k C a l l b a c k --- | |||
typedef void (*FailedAccessCheckCallback)(Local<Object> target, | typedef void (*FailedAccessCheckCallback)(Local<Object> target, | |||
AccessType type, | AccessType type, | |||
Local<Value> data); | Local<Value> data); | |||
// --- G a r b a g e C o l l e c t i o n C a l l b a c k s | // --- G a r b a g e C o l l e c t i o n C a l l b a c k s | |||
/** | /** | |||
* Applications can register a callback function which is called | * Applications can register callback functions which will be called | |||
* before and after a major garbage collection. Allocations are not | * before and after a garbage collection. Allocations are not | |||
* allowed in the callback function, you therefore cannot manipulate | * allowed in the callback functions, you therefore cannot manipulate | |||
* objects (set or delete properties for example) since it is possible | * objects (set or delete properties for example) since it is possible | |||
* such operations will result in the allocation of objects. | * such operations will result in the allocation of objects. | |||
*/ | */ | |||
enum GCType { | ||||
kGCTypeScavenge = 1 << 0, | ||||
kGCTypeMarkSweepCompact = 1 << 1, | ||||
kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact | ||||
}; | ||||
enum GCCallbackFlags { | ||||
kNoGCCallbackFlags = 0, | ||||
kGCCallbackFlagCompacted = 1 << 0 | ||||
}; | ||||
typedef void (*GCPrologueCallback)(GCType type, GCCallbackFlags flags); | ||||
typedef void (*GCEpilogueCallback)(GCType type, GCCallbackFlags flags); | ||||
typedef void (*GCCallback)(); | typedef void (*GCCallback)(); | |||
// --- C o n t e x t G e n e r a t o r --- | // --- C o n t e x t G e n e r a t o r --- | |||
/** | /** | |||
* Applications must provide a callback function which is called to generat e | * Applications must provide a callback function which is called to generat e | |||
* a context if a context was not deserialized from the snapshot. | * a context if a context was not deserialized from the snapshot. | |||
*/ | */ | |||
typedef Persistent<Context> (*ContextGenerator)(); | typedef Persistent<Context> (*ContextGenerator)(); | |||
skipping to change at line 2237 | skipping to change at line 2251 | |||
* Enables the computation of a sliding window of states. The sliding | * Enables the computation of a sliding window of states. The sliding | |||
* window information is recorded in statistics counters. | * window information is recorded in statistics counters. | |||
*/ | */ | |||
static void EnableSlidingStateWindow(); | static void EnableSlidingStateWindow(); | |||
/** Callback function for reporting failed access checks.*/ | /** Callback function for reporting failed access checks.*/ | |||
static void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallbac k); | static void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallbac k); | |||
/** | /** | |||
* Enables the host application to receive a notification before a | * Enables the host application to receive a notification before a | |||
* major garbage colletion. Allocations are not allowed in the | * 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. | ||||
*/ | ||||
static void AddGCPrologueCallback( | ||||
GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll); | ||||
/** | ||||
* This function removes callback which was installed by | ||||
* AddGCPrologueCallback function. | ||||
*/ | ||||
static void RemoveGCPrologueCallback(GCPrologueCallback callback); | ||||
/** | ||||
* The function is deprecated. Please use AddGCPrologueCallback instead. | ||||
* 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 | * callback function, you therefore cannot manipulate objects (set | |||
* or delete properties for example) since it is possible such | * or delete properties for example) since it is possible such | |||
* operations will result in the allocation of objects. | * operations will result in the allocation of objects. | |||
*/ | */ | |||
static void SetGlobalGCPrologueCallback(GCCallback); | static void SetGlobalGCPrologueCallback(GCCallback); | |||
/** | /** | |||
* Enables the host application to receive a notification after a | * 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. | ||||
*/ | ||||
static void AddGCEpilogueCallback( | ||||
GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); | ||||
/** | ||||
* This function removes callback which was installed by | ||||
* AddGCEpilogueCallback function. | ||||
*/ | ||||
static void RemoveGCEpilogueCallback(GCEpilogueCallback callback); | ||||
/** | ||||
* The function is deprecated. Please use AddGCEpilogueCallback instead. | ||||
* Enables the host application to receive a notification after a | ||||
* major garbage collection. Allocations are not allowed in the | * major garbage collection. Allocations are not allowed in the | |||
* callback function, you therefore cannot manipulate objects (set | * callback function, you therefore cannot manipulate objects (set | |||
* or delete properties for example) since it is possible such | * or delete properties for example) since it is possible such | |||
* operations will result in the allocation of objects. | * operations will result in the allocation of objects. | |||
*/ | */ | |||
static void SetGlobalGCEpilogueCallback(GCCallback); | static void SetGlobalGCEpilogueCallback(GCCallback); | |||
/** | /** | |||
* Allows the host application to group objects together. If one | * Allows the host application to group objects together. If one | |||
* object in the group is alive, all objects in the group are alive. | * object in the group is alive, all objects in the group are alive. | |||
skipping to change at line 2617 | skipping to change at line 2671 | |||
Local<Object> Global(); | Local<Object> Global(); | |||
/** | /** | |||
* Detaches the global object from its context before | * Detaches the global object from its context before | |||
* the global object can be reused to create a new context. | * the global object can be reused to create a new context. | |||
*/ | */ | |||
void DetachGlobal(); | void DetachGlobal(); | |||
/** Creates a new context. */ | /** Creates a new context. */ | |||
static Persistent<Context> New( | static Persistent<Context> New( | |||
ExtensionConfiguration* extensions = 0, | ExtensionConfiguration* extensions = NULL, | |||
Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), | Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), | |||
Handle<Value> global_object = Handle<Value>()); | Handle<Value> global_object = Handle<Value>()); | |||
/** Returns the last entered context. */ | /** Returns the last entered context. */ | |||
static Local<Context> GetEntered(); | static Local<Context> GetEntered(); | |||
/** Returns the context that is on the top of the stack. */ | /** Returns the context that is on the top of the stack. */ | |||
static Local<Context> GetCurrent(); | static Local<Context> GetCurrent(); | |||
/** | /** | |||
End of changes. 5 change blocks. | ||||
5 lines changed or deleted | 61 lines changed or added | |||