v8.h   v8.h 
skipping to change at line 705 skipping to change at line 705
// TODO(dcarney): remove // TODO(dcarney): remove
#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 Persistent(S* that) : val_(that) { } template <class S> V8_INLINE Persistent(S* that) : val_(that) { }
V8_INLINE T* operator*() const { return val_; } V8_INLINE T* operator*() const { return val_; }
private: private:
friend class Isolate;
friend class Utils; 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 F1, class F2> friend class Persistent; template<class F1, class F2> friend class Persistent;
template<class F> friend class ReturnValue; template<class F> friend class ReturnValue;
V8_INLINE static T* New(Isolate* isolate, T* that); V8_INLINE static T* New(Isolate* isolate, T* that);
template<class S, class M2> template<class S, class M2>
V8_INLINE void Copy(const Persistent<S, M2>& that); V8_INLINE void Copy(const Persistent<S, M2>& that);
skipping to change at line 3969 skipping to change at line 3970
* Allows the host application to group objects together. If one * Allows the host application to group objects together. If one
* object in the group is alive, all objects in the group are alive. * object in the group is alive, all objects in the group are alive.
* After each garbage collection, object groups are removed. It is * After each garbage collection, object groups are removed. It is
* intended to be used in the before-garbage-collection callback * intended to be used in the before-garbage-collection callback
* function, for instance to simulate DOM tree connections among JS * function, for instance to simulate DOM tree connections among JS
* wrapper objects. Object groups for all dependent handles need to * wrapper objects. Object groups for all dependent handles need to
* be provided for kGCTypeMarkSweepCompact collections, for all other * be provided for kGCTypeMarkSweepCompact collections, for all other
* garbage collection types it is sufficient to provide object groups * garbage collection types it is sufficient to provide object groups
* for partially dependent handles only. * for partially dependent handles only.
*/ */
void SetObjectGroupId(const Persistent<Value>& object, template<typename T> void SetObjectGroupId(const Persistent<T>& object,
UniqueId id); UniqueId id);
/** /**
* Allows the host application to declare implicit references from an obj ect * Allows the host application to declare implicit references from an obj ect
* group to an object. If the objects of the object group are alive, the child * group to an object. If the objects of the object group are alive, the child
* object is alive too. After each garbage collection, all implicit refer ences * object is alive too. After each garbage collection, all implicit refer ences
* are removed. It is intended to be used in the before-garbage-collectio n * are removed. It is intended to be used in the before-garbage-collectio n
* callback function. * callback function.
*/ */
void SetReferenceFromGroup(UniqueId id, template<typename T> void SetReferenceFromGroup(UniqueId id,
const Persistent<Value>& child); const Persistent<T>& chil
d);
/** /**
* Allows the host application to declare implicit references from an obj ect * Allows the host application to declare implicit references from an obj ect
* to another object. If the parent object is alive, the child object is alive * to another object. If the parent object is alive, the child object is alive
* too. After each garbage collection, all implicit references are remove d. It * too. After each garbage collection, all implicit references are remove d. It
* is intended to be used in the before-garbage-collection callback funct ion. * is intended to be used in the before-garbage-collection callback funct ion.
*/ */
void SetReference(const Persistent<Object>& parent, template<typename T, typename S>
const Persistent<Value>& child); void SetReference(const Persistent<T>& parent, const Persistent<S>& child
);
typedef void (*GCPrologueCallback)(Isolate* isolate, typedef void (*GCPrologueCallback)(Isolate* isolate,
GCType type, GCType type,
GCCallbackFlags flags); GCCallbackFlags flags);
typedef void (*GCEpilogueCallback)(Isolate* isolate, typedef void (*GCEpilogueCallback)(Isolate* isolate,
GCType type, GCType type,
GCCallbackFlags flags); GCCallbackFlags flags);
/** /**
* Enables the host application to receive a notification before a * Enables the host application to receive a notification before a
skipping to change at line 4043 skipping to change at line 4044
*/ */
void RemoveGCEpilogueCallback(GCEpilogueCallback callback); void RemoveGCEpilogueCallback(GCEpilogueCallback callback);
private: private:
Isolate(); Isolate();
Isolate(const Isolate&); Isolate(const Isolate&);
~Isolate(); ~Isolate();
Isolate& operator=(const Isolate&); Isolate& operator=(const Isolate&);
void* operator new(size_t size); void* operator new(size_t size);
void operator delete(void*, size_t); void operator delete(void*, size_t);
void SetObjectGroupId(internal::Object** object, UniqueId id);
void SetReferenceFromGroup(UniqueId id, internal::Object** object);
void SetReference(internal::Object** parent, internal::Object** child);
}; };
class V8_EXPORT StartupData { class V8_EXPORT StartupData {
public: public:
enum CompressionAlgorithm { enum CompressionAlgorithm {
kUncompressed, kUncompressed,
kBZip2 kBZip2
}; };
const char* data; const char* data;
skipping to change at line 6209 skipping to change at line 6214
void Isolate::SetData(void* data) { void Isolate::SetData(void* data) {
typedef internal::Internals I; typedef internal::Internals I;
I::SetEmbedderData(this, data); I::SetEmbedderData(this, data);
} }
void* Isolate::GetData() { void* Isolate::GetData() {
typedef internal::Internals I; typedef internal::Internals I;
return I::GetEmbedderData(this); return I::GetEmbedderData(this);
} }
template<typename T>
void Isolate::SetObjectGroupId(const Persistent<T>& object,
UniqueId id) {
TYPE_CHECK(Value, T);
SetObjectGroupId(reinterpret_cast<v8::internal::Object**>(object.val_), i
d);
}
template<typename T>
void Isolate::SetReferenceFromGroup(UniqueId id,
const Persistent<T>& object) {
TYPE_CHECK(Value, T);
SetReferenceFromGroup(id,
reinterpret_cast<v8::internal::Object**>(object.val
_));
}
template<typename T, typename S>
void Isolate::SetReference(const Persistent<T>& parent,
const Persistent<S>& child) {
TYPE_CHECK(Object, T);
TYPE_CHECK(Value, S);
SetReference(reinterpret_cast<v8::internal::Object**>(parent.val_),
reinterpret_cast<v8::internal::Object**>(child.val_));
}
Local<Value> Context::GetEmbedderData(int index) { Local<Value> Context::GetEmbedderData(int index) {
#ifndef V8_ENABLE_CHECKS #ifndef V8_ENABLE_CHECKS
typedef internal::Object O; typedef internal::Object O;
typedef internal::HeapObject HO; typedef internal::HeapObject HO;
typedef internal::Internals I; typedef internal::Internals I;
HO* context = *reinterpret_cast<HO**>(this); HO* context = *reinterpret_cast<HO**>(this);
O** result = O** result =
HandleScope::CreateHandle(context, I::ReadEmbedderData<O*>(this, inde x)); HandleScope::CreateHandle(context, I::ReadEmbedderData<O*>(this, inde x));
return Local<Value>(reinterpret_cast<Value*>(result)); return Local<Value>(reinterpret_cast<Value*>(result));
#else #else
 End of changes. 6 change blocks. 
6 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/