v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 814 | skipping to change at line 814 | |||
*/ | */ | |||
class V8_EXPORT HandleScope { | class V8_EXPORT HandleScope { | |||
public: | public: | |||
HandleScope(Isolate* isolate); | HandleScope(Isolate* isolate); | |||
~HandleScope(); | ~HandleScope(); | |||
/** | /** | |||
* Counts the number of allocated handles. | * Counts the number of allocated handles. | |||
*/ | */ | |||
static int NumberOfHandles(); | static int NumberOfHandles(Isolate* isolate); | |||
private: | private: | |||
/** | /** | |||
* Creates a new handle with the given value. | * Creates a new handle with the given value. | |||
*/ | */ | |||
static internal::Object** CreateHandle(internal::Isolate* isolate, | static internal::Object** CreateHandle(internal::Isolate* isolate, | |||
internal::Object* value); | internal::Object* value); | |||
// Uses HeapObject to obtain the current Isolate. | // Uses HeapObject to obtain the current Isolate. | |||
static internal::Object** CreateHandle(internal::HeapObject* heap_object, | static internal::Object** CreateHandle(internal::HeapObject* heap_object, | |||
internal::Object* value); | internal::Object* value); | |||
skipping to change at line 4273 | skipping to change at line 4273 | |||
* Interface for iterating through all the persistent handles in the heap. | * Interface for iterating through all the persistent handles in the heap. | |||
*/ | */ | |||
class V8_EXPORT PersistentHandleVisitor { // NOLINT | class V8_EXPORT PersistentHandleVisitor { // NOLINT | |||
public: | public: | |||
virtual ~PersistentHandleVisitor() {} | virtual ~PersistentHandleVisitor() {} | |||
virtual void VisitPersistentHandle(Persistent<Value>* value, | virtual void VisitPersistentHandle(Persistent<Value>* value, | |||
uint16_t class_id) {} | uint16_t class_id) {} | |||
}; | }; | |||
/** | /** | |||
* Asserts that no action is performed that could cause a handle's value | ||||
* to be modified. Useful when otherwise unsafe handle operations need to | ||||
* be performed. | ||||
*/ | ||||
class V8_EXPORT AssertNoGCScope { | ||||
#ifndef DEBUG | ||||
// TODO(yangguo): remove isolate argument. | ||||
V8_INLINE AssertNoGCScope(Isolate* isolate) {} | ||||
#else | ||||
AssertNoGCScope(Isolate* isolate); | ||||
~AssertNoGCScope(); | ||||
private: | ||||
void* disallow_heap_allocation_; | ||||
#endif | ||||
}; | ||||
/** | ||||
* Container class for static utility functions. | * Container class for static utility functions. | |||
*/ | */ | |||
class V8_EXPORT V8 { | class V8_EXPORT V8 { | |||
public: | public: | |||
/** Set the callback to invoke in case of fatal errors. */ | /** Set the callback to invoke in case of fatal errors. */ | |||
static void SetFatalErrorHandler(FatalErrorCallback that); | static void SetFatalErrorHandler(FatalErrorCallback that); | |||
/** | /** | |||
* Set the callback to invoke to check if code generation from | * Set the callback to invoke to check if code generation from | |||
* strings should be allowed. | * strings should be allowed. | |||
End of changes. 2 change blocks. | ||||
18 lines changed or deleted | 1 lines changed or added | |||