v8.h   v8.h 
skipping to change at line 126 skipping to change at line 126
class Date; class Date;
class DeclaredAccessorDescriptor; class DeclaredAccessorDescriptor;
class External; class External;
class Function; class Function;
class FunctionTemplate; class FunctionTemplate;
class HeapProfiler; class HeapProfiler;
class ImplementationUtilities; class ImplementationUtilities;
class Int32; class Int32;
class Integer; class Integer;
class Isolate; class Isolate;
class LocalContext;
class Number; class Number;
class NumberObject; class NumberObject;
class Object; class Object;
class ObjectOperationDescriptor; class ObjectOperationDescriptor;
class ObjectTemplate; class ObjectTemplate;
class Primitive; class Primitive;
class RawOperationDescriptor; class RawOperationDescriptor;
class Signature; class Signature;
class StackFrame; class StackFrame;
class StackTrace; class StackTrace;
skipping to change at line 165 skipping to change at line 164
class DeclaredAccessorDescriptor; class DeclaredAccessorDescriptor;
class ObjectOperationDescriptor; class ObjectOperationDescriptor;
class RawOperationDescriptor; class RawOperationDescriptor;
namespace internal { namespace internal {
class Arguments; class Arguments;
class Heap; class Heap;
class HeapObject; class HeapObject;
class Isolate; class Isolate;
class Object; class Object;
template<typename T> template<typename T> class CustomArguments;
class CustomArguments;
class PropertyCallbackArguments; class PropertyCallbackArguments;
class FunctionCallbackArguments; class FunctionCallbackArguments;
} }
/** /**
* General purpose unique identifier. * General purpose unique identifier.
*/ */
class UniqueId { class UniqueId {
public: public:
explicit UniqueId(intptr_t data) explicit UniqueId(intptr_t data)
skipping to change at line 364 skipping to change at line 362
private: private:
#endif #endif
/** /**
* Creates a new handle for the specified value. * Creates a new handle for the specified value.
*/ */
V8_INLINE(explicit Handle(T* val)) : val_(val) {} V8_INLINE(explicit Handle(T* val)) : val_(val) {}
#endif #endif
private: private:
friend class Utils;
template<class F> friend class Persistent; template<class F> friend class Persistent;
template<class F> friend class Local; template<class F> friend class Local;
friend class Arguments; friend class Arguments;
template<class F> friend class FunctionCallbackInfo; template<class F> friend class FunctionCallbackInfo;
template<class F> friend class PropertyCallbackInfo; template<class F> friend class PropertyCallbackInfo;
friend class String; template<class F> friend class internal::CustomArguments;
friend class Object;
friend class AccessorInfo; friend class AccessorInfo;
friend Handle<Primitive> Undefined(Isolate* isolate); friend Handle<Primitive> Undefined(Isolate* isolate);
friend Handle<Primitive> Null(Isolate* isolate); friend Handle<Primitive> Null(Isolate* isolate);
friend Handle<Boolean> True(Isolate* isolate); friend Handle<Boolean> True(Isolate* isolate);
friend Handle<Boolean> False(Isolate* isolate); friend Handle<Boolean> False(Isolate* isolate);
friend class Context; friend class Context;
friend class InternalHandleHelper;
friend class LocalContext;
friend class HandleScope; friend class HandleScope;
#ifndef V8_USE_UNSAFE_HANDLES #ifndef V8_USE_UNSAFE_HANDLES
V8_INLINE(static Handle<T> New(Isolate* isolate, T* that)); V8_INLINE(static Handle<T> New(Isolate* isolate, T* that));
#endif #endif
T* val_; T* val_;
}; };
/** /**
skipping to change at line 451 skipping to change at line 447
V8_INLINE(static Local<T> New(Isolate* isolate, const Persistent<T>& that )); V8_INLINE(static Local<T> New(Isolate* isolate, const Persistent<T>& that ));
#ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR #ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR
private: private:
#endif #endif
template <class S> V8_INLINE(Local(S* that) : Handle<T>(that)) { } template <class S> V8_INLINE(Local(S* that) : Handle<T>(that)) { }
#endif #endif
private: private:
friend class Utils;
template<class F> friend class Persistent; template<class F> friend class Persistent;
template<class F> friend class Handle; template<class F> friend class Handle;
friend class Arguments; friend class Arguments;
template<class F> friend class FunctionCallbackInfo; template<class F> friend class FunctionCallbackInfo;
template<class F> friend class PropertyCallbackInfo; template<class F> friend class PropertyCallbackInfo;
friend class String; friend class String;
friend class Object; friend class Object;
friend class AccessorInfo; friend class AccessorInfo;
friend class Context; friend class Context;
friend class InternalHandleHelper; template<class F> friend class internal::CustomArguments;
friend class LocalContext;
friend class HandleScope; friend class HandleScope;
V8_INLINE(static Local<T> New(Isolate* isolate, T* that)); V8_INLINE(static Local<T> New(Isolate* isolate, T* that));
}; };
/** /**
* An object reference that is independent of any handle scope. Where * An object reference that is independent of any handle scope. Where
* a Local handle only lives as long as the HandleScope in which it was * a Local handle only lives as long as the HandleScope in which it was
* allocated, a Persistent handle remains valid until it is explicitly * allocated, a Persistent handle remains valid until it is explicitly
* disposed. * disposed.
skipping to change at line 508 skipping to change at line 504
// TODO(dcarney): remove somehow before cutover // TODO(dcarney): remove somehow before cutover
// The handle should either be 0, or a pointer to a live cell. // The handle should either be 0, or a pointer to a live cell.
V8_INLINE(void Clear()) { val_ = 0; } V8_INLINE(void Clear()) { val_ = 0; }
/** /**
* A constructor that creates a new global cell pointing to that. In cont rast * A constructor that creates a new global cell pointing to that. In cont rast
* to the copy constructor, this creates a new persistent handle which ne eds * to the copy constructor, this creates a new persistent handle which ne eds
* to be separately disposed. * to be separately disposed.
*/ */
template <class S> V8_INLINE(Persistent(Isolate* isolate, Handle<S> that) ) template <class S> V8_INLINE(Persistent(Isolate* isolate, Handle<S> that) )
: val_(*New(isolate, that)) { } : val_(New(isolate, *that)) { }
template <class S> V8_INLINE(Persistent(Isolate* isolate, template <class S> V8_INLINE(Persistent(Isolate* isolate,
Persistent<S>& that)) // NOLINT Persistent<S>& that)) // NOLINT
: val_(*New(isolate, that)) { } : val_(New(isolate, *that)) { }
#else #else
/** /**
* Creates an empty persistent handle that doesn't point to any * Creates an empty persistent handle that doesn't point to any
* storage cell. * storage cell.
*/ */
V8_INLINE(Persistent()) : Handle<T>() { } V8_INLINE(Persistent()) : Handle<T>() { }
/** /**
* Creates a persistent handle for the same storage cell as the * Creates a persistent handle for the same storage cell as the
skipping to change at line 591 skipping to change at line 587
if (!that.IsEmpty()) T::Cast(*that); if (!that.IsEmpty()) T::Cast(*that);
#endif #endif
return reinterpret_cast<Persistent<T>&>(that); return reinterpret_cast<Persistent<T>&>(that);
} }
template <class S> V8_INLINE(Persistent<S>& As()) { // NOLINT template <class S> V8_INLINE(Persistent<S>& As()) { // NOLINT
return Persistent<S>::Cast(*this); return Persistent<S>::Cast(*this);
} }
#endif #endif
#ifdef V8_USE_UNSAFE_HANDLES
V8_DEPRECATED(static Persistent<T> New(Handle<T> that)); V8_DEPRECATED(static Persistent<T> New(Handle<T> that));
/**
* Creates a new persistent handle for an existing local or persistent ha
ndle.
*/
// TODO(dcarney): remove before cutover
V8_INLINE(static Persistent<T> New(Isolate* isolate, Handle<T> that)); V8_INLINE(static Persistent<T> New(Isolate* isolate, Handle<T> that));
#ifndef V8_USE_UNSAFE_HANDLES
// TODO(dcarney): remove before cutover
V8_INLINE(static Persistent<T> New(Isolate* isolate, Persistent<T> that)) ; V8_INLINE(static Persistent<T> New(Isolate* isolate, Persistent<T> that)) ;
#endif #endif
#ifndef V8_USE_UNSAFE_HANDLES #ifndef V8_USE_UNSAFE_HANDLES
template <class S> V8_INLINE( template <class S> V8_INLINE(
bool operator==(const Persistent<S>& that) const) { bool operator==(const Persistent<S>& that) const) {
internal::Object** a = reinterpret_cast<internal::Object**>(**this); internal::Object** a = reinterpret_cast<internal::Object**>(**this);
internal::Object** b = reinterpret_cast<internal::Object**>(*that); internal::Object** b = reinterpret_cast<internal::Object**>(*that);
if (a == 0) return b == 0; if (a == 0) return b == 0;
if (b == 0) return false; if (b == 0) return false;
skipping to change at line 649 skipping to change at line 639
template<typename S, typename P> template<typename S, typename P>
V8_INLINE(void MakeWeak( V8_INLINE(void MakeWeak(
P* parameters, P* parameters,
typename WeakReferenceCallbacks<S, P>::Revivable callback)); typename WeakReferenceCallbacks<S, P>::Revivable callback));
template<typename P> template<typename P>
V8_INLINE(void MakeWeak( V8_INLINE(void MakeWeak(
P* parameters, P* parameters,
typename WeakReferenceCallbacks<T, P>::Revivable callback)); typename WeakReferenceCallbacks<T, P>::Revivable callback));
// TODO(dcarney): deprecate
template<typename S, typename P> template<typename S, typename P>
V8_INLINE(void MakeWeak( V8_DEPRECATED(void MakeWeak(
Isolate* isolate, Isolate* isolate,
P* parameters, P* parameters,
typename WeakReferenceCallbacks<S, P>::Revivable callback)) { typename WeakReferenceCallbacks<S, P>::Revivable callback));
MakeWeak<S, P>(parameters, callback);
}
// TODO(dcarney): deprecate
template<typename P> template<typename P>
V8_INLINE(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));
MakeWeak<P>(parameters, callback);
}
V8_INLINE(void ClearWeak()); V8_INLINE(void ClearWeak());
// TODO(dcarney): deprecate // TODO(dcarney): deprecate
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
skipping to change at line 776 skipping to change at line 760
return *this; return *this;
} }
public: public:
#ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR #ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR
private: private:
#endif #endif
// TODO(dcarney): remove before cutover // TODO(dcarney): remove before cutover
template <class S> V8_INLINE(Persistent(S* that)) : val_(that) { } template <class S> V8_INLINE(Persistent(S* that)) : val_(that) { }
// TODO(dcarney): remove before cutover
template <class S> V8_INLINE(Persistent(Persistent<S> that))
: val_(*that) {
TYPE_CHECK(T, S);
}
// TODO(dcarney): remove before cutover // TODO(dcarney): remove before cutover
V8_INLINE(T* operator*() const) { return val_; } V8_INLINE(T* operator*() const) { return val_; }
private: private:
// TODO(dcarney): remove before cutover // TODO(dcarney): remove before cutover
V8_INLINE(T* operator->() const) { return val_; } V8_INLINE(T* operator->() const) { return val_; }
public: public:
#endif #endif
private: private:
friend class Utils;
template<class F> friend class Handle; template<class F> friend class Handle;
template<class F> friend class Local; template<class F> friend class Local;
template<class F> friend class Persistent;
template<class F> friend class ReturnValue; template<class F> friend class ReturnValue;
friend class ImplementationUtilities;
friend class ObjectTemplate;
friend class Context;
friend class InternalHandleHelper;
friend class LocalContext;
V8_INLINE(static Persistent<T> New(Isolate* isolate, T* that)); V8_INLINE(static T* New(Isolate* isolate, T* that));
#ifndef V8_USE_UNSAFE_HANDLES #ifndef V8_USE_UNSAFE_HANDLES
T* val_; T* val_;
#endif #endif
}; };
/** /**
* A stack-allocated class that governs a number of local handles. * A stack-allocated class that governs a number of local handles.
* After a handle scope has been created, all local handles will be * After a handle scope has been created, all local handles will be
* allocated within that handle scope until either the handle scope is * allocated within that handle scope until either the handle scope is
skipping to change at line 5395 skipping to change at line 5372
template <class T> template <class T>
Local<T> Local<T>::New(Isolate* isolate, T* that) { Local<T> Local<T>::New(Isolate* isolate, T* that) {
if (that == NULL) return Local<T>(); if (that == NULL) return Local<T>();
T* that_ptr = that; T* that_ptr = that;
internal::Object** p = reinterpret_cast<internal::Object**>(that_ptr); internal::Object** p = reinterpret_cast<internal::Object**>(that_ptr);
return Local<T>(reinterpret_cast<T*>(HandleScope::CreateHandle( return Local<T>(reinterpret_cast<T*>(HandleScope::CreateHandle(
reinterpret_cast<internal::Isolate*>(isolate), *p))); reinterpret_cast<internal::Isolate*>(isolate), *p)));
} }
#ifdef V8_USE_UNSAFE_HANDLES
template <class T> template <class T>
Persistent<T> Persistent<T>::New(Handle<T> that) { Persistent<T> Persistent<T>::New(Handle<T> that) {
return New(Isolate::GetCurrent(), that.val_); return New(Isolate::GetCurrent(), that.val_);
} }
template <class T> template <class T>
Persistent<T> Persistent<T>::New(Isolate* isolate, Handle<T> that) { Persistent<T> Persistent<T>::New(Isolate* isolate, Handle<T> that) {
return New(Isolate::GetCurrent(), that.val_); return New(Isolate::GetCurrent(), that.val_);
} }
#ifndef V8_USE_UNSAFE_HANDLES
template <class T> template <class T>
Persistent<T> Persistent<T>::New(Isolate* isolate, Persistent<T> that) { Persistent<T> Persistent<T>::New(Isolate* isolate, Persistent<T> that) {
return New(Isolate::GetCurrent(), that.val_); return New(Isolate::GetCurrent(), that.val_);
} }
#endif #endif
template <class T> template <class T>
Persistent<T> Persistent<T>::New(Isolate* isolate, T* that) { T* Persistent<T>::New(Isolate* isolate, T* that) {
if (that == NULL) return Persistent<T>(); if (that == NULL) return NULL;
internal::Object** p = reinterpret_cast<internal::Object**>(that); internal::Object** p = reinterpret_cast<internal::Object**>(that);
return Persistent<T>(reinterpret_cast<T*>( return reinterpret_cast<T*>(
V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate), V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate),
p))); p));
} }
template <class T> template <class T>
bool Persistent<T>::IsIndependent() const { bool Persistent<T>::IsIndependent() const {
typedef internal::Internals I; typedef internal::Internals I;
if (this->IsEmpty()) return false; if (this->IsEmpty()) return false;
return I::GetNodeFlag(reinterpret_cast<internal::Object**>(this->val_), return I::GetNodeFlag(reinterpret_cast<internal::Object**>(this->val_),
I::kNodeIsIndependentShift); I::kNodeIsIndependentShift);
} }
skipping to change at line 5475 skipping to change at line 5452
template <class T> template <class T>
template <typename P> template <typename P>
void Persistent<T>::MakeWeak( void Persistent<T>::MakeWeak(
P* parameters, P* parameters,
typename WeakReferenceCallbacks<T, P>::Revivable callback) { typename WeakReferenceCallbacks<T, P>::Revivable callback) {
MakeWeak<T, P>(parameters, callback); MakeWeak<T, P>(parameters, callback);
} }
template <class T> template <class T>
template <typename S, typename P>
void Persistent<T>::MakeWeak(
Isolate* isolate,
P* parameters,
typename WeakReferenceCallbacks<S, P>::Revivable callback) {
MakeWeak<S, P>(parameters, callback);
}
template <class T>
template<typename P>
void Persistent<T>::MakeWeak(
Isolate* isolate,
P* parameters,
typename WeakReferenceCallbacks<T, P>::Revivable callback) {
MakeWeak<P>(parameters, callback);
}
template <class T>
void Persistent<T>::ClearWeak() { void Persistent<T>::ClearWeak() {
V8::ClearWeak(reinterpret_cast<internal::Object**>(this->val_)); V8::ClearWeak(reinterpret_cast<internal::Object**>(this->val_));
} }
template <class T> template <class T>
void Persistent<T>::MarkIndependent() { void Persistent<T>::MarkIndependent() {
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,
 End of changes. 29 change blocks. 
45 lines changed or deleted 39 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/