v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 138 | skipping to change at line 138 | |||
class Heap; | class Heap; | |||
class Top; | class Top; | |||
} | } | |||
// --- W e a k H a n d l e s | // --- W e a k H a n d l e s | |||
/** | /** | |||
* A weak reference callback function. | * A weak reference callback function. | |||
* | * | |||
* This callback should either explicitly invoke Dispose on |object| if | ||||
* V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWe | ||||
ak. | ||||
* | ||||
* \param object the weak global object to be reclaimed by the garbage coll ector | * \param object the weak global object to be reclaimed by the garbage coll ector | |||
* \param parameter the value passed in when making the weak global object | * \param parameter the value passed in when making the weak global object | |||
*/ | */ | |||
typedef void (*WeakReferenceCallback)(Persistent<Value> object, | typedef void (*WeakReferenceCallback)(Persistent<Value> object, | |||
void* parameter); | void* parameter); | |||
// --- H a n d l e s --- | // --- H a n d l e s --- | |||
#define TYPE_CHECK(T, S) \ | #define TYPE_CHECK(T, S) \ | |||
while (false) { \ | while (false) { \ | |||
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \ | *(static_cast<T**>(0)) = static_cast<S*>(0); \ | |||
} | } | |||
/** | /** | |||
* An object reference managed by the v8 garbage collector. | * An object reference managed by the v8 garbage collector. | |||
* | * | |||
* All objects returned from v8 have to be tracked by the garbage | * All objects returned from v8 have to be tracked by the garbage | |||
* collector so that it knows that the objects are still alive. Also, | * collector so that it knows that the objects are still alive. Also, | |||
* because the garbage collector may move objects, it is unsafe to | * because the garbage collector may move objects, it is unsafe to | |||
* point directly to an object. Instead, all objects are stored in | * point directly to an object. Instead, all objects are stored in | |||
* handles which are known by the garbage collector and updated | * handles which are known by the garbage collector and updated | |||
End of changes. 2 change blocks. | ||||
7 lines changed or deleted | 3 lines changed or added | |||