v8.h   v8.h 
skipping to change at line 629 skipping to change at line 629
#endif #endif
V8_INLINE(void Dispose()); V8_INLINE(void Dispose());
/** /**
* Releases the storage cell referenced by this persistent handle. * Releases the storage cell referenced by this persistent handle.
* Does not remove the reference to the cell from any handles. * Does not remove the reference to the cell from any handles.
* This handle's reference, and any other references to the storage * This handle's reference, and any other references to the storage
* cell remain and IsEmpty will still return false. * cell remain and IsEmpty will still return false.
*/ */
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(void Dispose(Isolate* isolate))) { Dispose(); }
V8_INLINE(void Dispose(Isolate* isolate)) { Dispose(); }
/** /**
* Make the reference to this object weak. When only weak handles * Make the reference to this object weak. When only weak handles
* refer to the object, the garbage collector will perform a * refer to the object, the garbage collector will perform a
* callback to the given V8::NearDeathCallback function, passing * callback to the given V8::NearDeathCallback function, passing
* it the object reference and the given parameters. * it the object reference and the given parameters.
*/ */
template<typename S, typename P> template<typename S, typename P>
V8_INLINE(void MakeWeak( V8_INLINE(void MakeWeak(
P* parameters, P* parameters,
skipping to change at line 662 skipping to change at line 661
typename WeakReferenceCallbacks<S, P>::Revivable callback)); typename WeakReferenceCallbacks<S, P>::Revivable callback));
template<typename P> template<typename P>
V8_DEPRECATED(void MakeWeak( V8_DEPRECATED(void MakeWeak(
Isolate* isolate, Isolate* isolate,
P* parameters, P* parameters,
typename WeakReferenceCallbacks<T, P>::Revivable callback)); typename WeakReferenceCallbacks<T, P>::Revivable callback));
V8_INLINE(void ClearWeak()); V8_INLINE(void ClearWeak());
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(void ClearWeak(Isolate* isolate))) { ClearWeak();
V8_INLINE(void ClearWeak(Isolate* isolate)) { ClearWeak(); } }
/** /**
* Marks the reference to this object independent. Garbage collector is f ree * Marks the reference to this object independent. Garbage collector is f ree
* to ignore any object groups containing this object. Weak callback for an * to ignore any object groups containing this object. Weak callback for an
* independent handle should not assume that it will be preceded by a glo bal * independent handle should not assume that it will be preceded by a glo bal
* GC prologue callback or followed by a global GC epilogue callback. * GC prologue callback or followed by a global GC epilogue callback.
*/ */
V8_INLINE(void MarkIndependent()); V8_INLINE(void MarkIndependent());
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(void MarkIndependent(Isolate* isolate))) {
V8_INLINE(void MarkIndependent(Isolate* isolate)) { MarkIndependent(); } MarkIndependent();
}
/** /**
* Marks the reference to this object partially dependent. Partially depe ndent * Marks the reference to this object partially dependent. Partially depe ndent
* handles only depend on other partially dependent handles and these * handles only depend on other partially dependent handles and these
* dependencies are provided through object groups. It provides a way to build * dependencies are provided through object groups. It provides a way to build
* smaller object groups for young objects that represent only a subset o f all * smaller object groups for young objects that represent only a subset o f all
* external dependencies. This mark is automatically cleared after each * external dependencies. This mark is automatically cleared after each
* garbage collection. * garbage collection.
*/ */
V8_INLINE(void MarkPartiallyDependent()); V8_INLINE(void MarkPartiallyDependent());
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(void MarkPartiallyDependent(Isolate* isolate))) {
V8_INLINE(void MarkPartiallyDependent(Isolate* isolate)) {
MarkPartiallyDependent(); MarkPartiallyDependent();
} }
V8_INLINE(bool IsIndependent() const); V8_INLINE(bool IsIndependent() const);
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(bool IsIndependent(Isolate* isolate)) const) {
V8_INLINE(bool IsIndependent(Isolate* isolate) const) {
return IsIndependent(); return IsIndependent();
} }
/** Checks if the handle holds the only reference to an object. */ /** Checks if the handle holds the only reference to an object. */
V8_INLINE(bool IsNearDeath() const); V8_INLINE(bool IsNearDeath() const);
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(bool IsNearDeath(Isolate* isolate)) const) {
V8_INLINE(bool IsNearDeath(Isolate* isolate) const) { return IsNearDeath( return IsNearDeath();
); } }
/** Returns true if the handle's reference is weak. */ /** Returns true if the handle's reference is weak. */
V8_INLINE(bool IsWeak() const); V8_INLINE(bool IsWeak() const);
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(bool IsWeak(Isolate* isolate)) const) {
V8_INLINE(bool IsWeak(Isolate* isolate) const) { return IsWeak(); } return IsWeak();
}
/** /**
* Assigns a wrapper class ID to the handle. See RetainedObjectInfo inter face * Assigns a wrapper class ID to the handle. See RetainedObjectInfo inter face
* description in v8-profiler.h for details. * description in v8-profiler.h for details.
*/ */
V8_INLINE(void SetWrapperClassId(uint16_t class_id)); V8_INLINE(void SetWrapperClassId(uint16_t class_id));
// TODO(dcarney): deprecate V8_DEPRECATED(
V8_INLINE(void SetWrapperClassId(Isolate* isolate, uint16_t class_id)) { V8_INLINE(void SetWrapperClassId(Isolate * isolate, uint16_t class_id
))) {
SetWrapperClassId(class_id); SetWrapperClassId(class_id);
} }
/** /**
* Returns the class ID previously assigned to this handle or 0 if no cla ss ID * Returns the class ID previously assigned to this handle or 0 if no cla ss ID
* was previously assigned. * was previously assigned.
*/ */
V8_INLINE(uint16_t WrapperClassId() const); V8_INLINE(uint16_t WrapperClassId() const);
// TODO(dcarney): deprecate V8_DEPRECATED(V8_INLINE(uint16_t WrapperClassId(Isolate* isolate)) const)
V8_INLINE(uint16_t WrapperClassId(Isolate* isolate) const) { {
return WrapperClassId(); return WrapperClassId();
} }
/** /**
* Disposes the current contents of the handle and replaces it. * Disposes the current contents of the handle and replaces it.
*/ */
V8_INLINE(void Reset(Isolate* isolate, const Handle<T>& other)); V8_INLINE(void Reset(Isolate* isolate, const Handle<T>& other));
#ifndef V8_USE_UNSAFE_HANDLES #ifndef V8_USE_UNSAFE_HANDLES
V8_INLINE(void Reset(Isolate* isolate, const Persistent<T>& other)); V8_INLINE(void Reset(Isolate* isolate, const Persistent<T>& other));
skipping to change at line 5600 skipping to change at line 5598
void Persistent<T>::MarkPartiallyDependent() { void Persistent<T>::MarkPartiallyDependent() {
typedef internal::Internals I; typedef internal::Internals I;
if (this->IsEmpty()) return; if (this->IsEmpty()) return;
I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_), I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_),
true, true,
I::kNodeIsPartiallyDependentShift); I::kNodeIsPartiallyDependentShift);
} }
template <class T> template <class T>
void Persistent<T>::Reset(Isolate* isolate, const Handle<T>& other) { void Persistent<T>::Reset(Isolate* isolate, const Handle<T>& other) {
Dispose(isolate); Dispose();
#ifdef V8_USE_UNSAFE_HANDLES #ifdef V8_USE_UNSAFE_HANDLES
*this = *New(isolate, other); *this = *New(isolate, other);
#else #else
if (other.IsEmpty()) { if (other.IsEmpty()) {
this->val_ = NULL; this->val_ = NULL;
return; return;
} }
internal::Object** p = reinterpret_cast<internal::Object**>(other.val_); internal::Object** p = reinterpret_cast<internal::Object**>(other.val_);
this->val_ = reinterpret_cast<T*>( this->val_ = reinterpret_cast<T*>(
V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate), p)); V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate), p));
#endif #endif
} }
#ifndef V8_USE_UNSAFE_HANDLES #ifndef V8_USE_UNSAFE_HANDLES
template <class T> template <class T>
void Persistent<T>::Reset(Isolate* isolate, const Persistent<T>& other) { void Persistent<T>::Reset(Isolate* isolate, const Persistent<T>& other) {
Dispose(isolate); Dispose();
if (other.IsEmpty()) { if (other.IsEmpty()) {
this->val_ = NULL; this->val_ = NULL;
return; return;
} }
internal::Object** p = reinterpret_cast<internal::Object**>(other.val_); internal::Object** p = reinterpret_cast<internal::Object**>(other.val_);
this->val_ = reinterpret_cast<T*>( this->val_ = reinterpret_cast<T*>(
V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate), p)); V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate), p));
} }
#endif #endif
 End of changes. 11 change blocks. 
21 lines changed or deleted 21 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/