v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 812 | skipping to change at line 812 | |||
internal::Object** RawClose(internal::Object** value); | internal::Object** RawClose(internal::Object** value); | |||
friend class ImplementationUtilities; | friend class ImplementationUtilities; | |||
}; | }; | |||
/** | /** | |||
* A simple Maybe type, representing an object which may or may not have a | * A simple Maybe type, representing an object which may or may not have a | |||
* value. | * value. | |||
*/ | */ | |||
template<class T> | template<class T> | |||
struct Maybe { | struct V8_EXPORT Maybe { | |||
Maybe() : has_value(false) {} | Maybe() : has_value(false) {} | |||
explicit Maybe(T t) : has_value(true), value(t) {} | explicit Maybe(T t) : has_value(true), value(t) {} | |||
Maybe(bool has, T t) : has_value(has), value(t) {} | Maybe(bool has, T t) : has_value(has), value(t) {} | |||
bool has_value; | bool has_value; | |||
T value; | T value; | |||
}; | }; | |||
// --- Special objects --- | // --- Special objects --- | |||
skipping to change at line 2330 | skipping to change at line 2330 | |||
V8_INLINE int Length() const; | V8_INLINE int Length() const; | |||
V8_INLINE Local<Value> operator[](int i) const; | V8_INLINE Local<Value> operator[](int i) const; | |||
V8_INLINE Local<Function> Callee() const; | V8_INLINE Local<Function> Callee() const; | |||
V8_INLINE Local<Object> This() const; | V8_INLINE Local<Object> This() const; | |||
V8_INLINE Local<Object> Holder() const; | V8_INLINE Local<Object> Holder() const; | |||
V8_INLINE bool IsConstructCall() const; | V8_INLINE bool IsConstructCall() const; | |||
V8_INLINE Local<Value> Data() const; | V8_INLINE Local<Value> Data() const; | |||
V8_INLINE Isolate* GetIsolate() const; | V8_INLINE Isolate* GetIsolate() const; | |||
V8_INLINE ReturnValue<T> GetReturnValue() const; | V8_INLINE ReturnValue<T> GetReturnValue() const; | |||
// This shouldn't be public, but the arm compiler needs it. | // This shouldn't be public, but the arm compiler needs it. | |||
static const int kArgsLength = 6; | static const int kArgsLength = 7; | |||
protected: | protected: | |||
friend class internal::FunctionCallbackArguments; | friend class internal::FunctionCallbackArguments; | |||
friend class internal::CustomArguments<FunctionCallbackInfo>; | friend class internal::CustomArguments<FunctionCallbackInfo>; | |||
static const int kReturnValueIndex = 0; | static const int kReturnValueIndex = 0; | |||
static const int kReturnValueDefaultValueIndex = -1; | static const int kReturnValueDefaultValueIndex = -1; | |||
static const int kIsolateIndex = -2; | static const int kIsolateIndex = -2; | |||
static const int kDataIndex = -3; | static const int kDataIndex = -3; | |||
static const int kCalleeIndex = -4; | static const int kCalleeIndex = -4; | |||
static const int kHolderIndex = -5; | static const int kHolderIndex = -5; | |||
static const int kContextSaveIndex = -6; | ||||
V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args, | V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args, | |||
internal::Object** values, | internal::Object** values, | |||
int length, | int length, | |||
bool is_construct_call); | bool is_construct_call); | |||
internal::Object** implicit_args_; | internal::Object** implicit_args_; | |||
internal::Object** values_; | internal::Object** values_; | |||
int length_; | int length_; | |||
bool is_construct_call_; | bool is_construct_call_; | |||
}; | }; | |||
skipping to change at line 3777 | skipping to change at line 3778 | |||
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 (*GCCallback)(); | ||||
/** | /** | |||
* 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 3960 | skipping to change at line 3959 | |||
/** | /** | |||
* Allows the host application to declare implicit references from an obj ect | * Allows the host application to declare implicit references from an obj ect | |||
* to another object. If the parent object is alive, the child object is alive | * to another object. If the parent object is alive, the child object is alive | |||
* too. After each garbage collection, all implicit references are remove d. It | * too. After each garbage collection, all implicit references are remove d. It | |||
* is intended to be used in the before-garbage-collection callback funct ion. | * is intended to be used in the before-garbage-collection callback funct ion. | |||
*/ | */ | |||
void SetReference(const Persistent<Object>& parent, | void SetReference(const Persistent<Object>& parent, | |||
const Persistent<Value>& child); | const Persistent<Value>& child); | |||
typedef void (*GCPrologueCallback)(Isolate* isolate, | ||||
GCType type, | ||||
GCCallbackFlags flags); | ||||
typedef void (*GCEpilogueCallback)(Isolate* isolate, | ||||
GCType type, | ||||
GCCallbackFlags flags); | ||||
/** | ||||
* 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 | ||||
* 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. | ||||
*/ | ||||
void AddGCPrologueCallback( | ||||
GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll); | ||||
/** | ||||
* This function removes callback which was installed by | ||||
* AddGCPrologueCallback function. | ||||
*/ | ||||
void RemoveGCPrologueCallback(GCPrologueCallback callback); | ||||
/** | ||||
* 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. | ||||
*/ | ||||
void AddGCEpilogueCallback( | ||||
GCEpilogueCallback callback, GCType gc_type_filter = kGCTypeAll); | ||||
/** | ||||
* This function removes callback which was installed by | ||||
* AddGCEpilogueCallback function. | ||||
*/ | ||||
void RemoveGCEpilogueCallback(GCEpilogueCallback callback); | ||||
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); | |||
}; | }; | |||
class V8_EXPORT StartupData { | class V8_EXPORT StartupData { | |||
skipping to change at line 4306 | skipping to change at line 4350 | |||
static void AddGCPrologueCallback( | static void AddGCPrologueCallback( | |||
GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll); | GCPrologueCallback callback, GCType gc_type_filter = kGCTypeAll); | |||
/** | /** | |||
* This function removes callback which was installed by | * This function removes callback which was installed by | |||
* AddGCPrologueCallback function. | * AddGCPrologueCallback function. | |||
*/ | */ | |||
static void RemoveGCPrologueCallback(GCPrologueCallback callback); | 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 | ||||
* or delete properties for example) since it is possible such | ||||
* operations will result in the allocation of objects. | ||||
*/ | ||||
V8_DEPRECATED(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 | * 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. It is possible | * 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 | * to specify the GCType filter for your callback. But it is not possible to | |||
* register the same callback function two times with different | * register the same callback function two times with different | |||
* GCType filters. | * GCType filters. | |||
*/ | */ | |||
static void AddGCEpilogueCallback( | static 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. | |||
*/ | */ | |||
static void RemoveGCEpilogueCallback(GCEpilogueCallback callback); | 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 | ||||
* 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. | ||||
*/ | ||||
V8_DEPRECATED(static void SetGlobalGCEpilogueCallback(GCCallback)); | ||||
/** | ||||
* Enables the host application to provide a mechanism to be notified | * Enables the host application to provide a mechanism to be notified | |||
* and perform custom logging when V8 Allocates Executable Memory. | * and perform custom logging when V8 Allocates Executable Memory. | |||
*/ | */ | |||
static void AddMemoryAllocationCallback(MemoryAllocationCallback callback , | static void AddMemoryAllocationCallback(MemoryAllocationCallback callback , | |||
ObjectSpace space, | ObjectSpace space, | |||
AllocationAction action); | AllocationAction action); | |||
/** | /** | |||
* Removes callback that was installed by AddMemoryAllocationCallback. | * Removes callback that was installed by AddMemoryAllocationCallback. | |||
*/ | */ | |||
End of changes. 7 change blocks. | ||||
24 lines changed or deleted | 50 lines changed or added | |||