| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index e5af0dd65f77f7d1192ca2c860d6c3464d6e7c95..6c6e71ed1611f8f36acc99d9303a6576529cde8e 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -151,11 +151,17 @@ class Isolate;
|
| * This callback should either explicitly invoke Dispose on |object| if
|
| * V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWeak.
|
| *
|
| + * \param isolate the current isolate
|
| * \param object the weak global object to be reclaimed by the garbage collector
|
| * \param parameter the value passed in when making the weak global object
|
| + *
|
| + * WeakReferenceCallback is deprecated. Use WeakHandleCallback instead.
|
| */
|
| typedef void (*WeakReferenceCallback)(Persistent<Value> object,
|
| void* parameter);
|
| +typedef void (*WeakHandleCallback)(Isolate* isolate,
|
| + Persistent<Value> object,
|
| + void* parameter);
|
|
|
|
|
| // --- Handles ---
|
| @@ -409,11 +415,12 @@ template <class T> class Persistent : public Handle<T> {
|
| * refer to the object, the garbage collector will perform a
|
| * callback to the given V8::WeakReferenceCallback function, passing
|
| * it the object reference and the given parameters.
|
| + * The 2-arg MakeWeak is deprecated. The 3-arg MakeWeak should be used.
|
| */
|
| V8_INLINE(void MakeWeak(void* parameters, WeakReferenceCallback callback));
|
| V8_INLINE(void MakeWeak(Isolate* isolate,
|
| void* parameters,
|
| - WeakReferenceCallback callback));
|
| + WeakHandleCallback callback));
|
|
|
| /** Clears the weak reference to this object. */
|
| V8_INLINE(void ClearWeak());
|
| @@ -3529,7 +3536,7 @@ class V8EXPORT V8 {
|
| static void MakeWeak(internal::Isolate* isolate,
|
| internal::Object** global_handle,
|
| void* data,
|
| - WeakReferenceCallback);
|
| + WeakHandleCallback);
|
| static void ClearWeak(internal::Object** global_handle);
|
| static void MarkIndependent(internal::Object** global_handle);
|
| static void MarkIndependent(internal::Isolate* isolate,
|
| @@ -4376,7 +4383,7 @@ void Persistent<T>::MakeWeak(void* parameters, WeakReferenceCallback callback) {
|
|
|
| template <class T>
|
| void Persistent<T>::MakeWeak(Isolate* isolate, void* parameters,
|
| - WeakReferenceCallback callback) {
|
| + WeakHandleCallback callback) {
|
| V8::MakeWeak(reinterpret_cast<internal::Isolate*>(isolate),
|
| reinterpret_cast<internal::Object**>(**this),
|
| parameters,
|
|
|