| Index: Source/bindings/v8/V8DOMWrapper.h
|
| diff --git a/Source/bindings/v8/V8DOMWrapper.h b/Source/bindings/v8/V8DOMWrapper.h
|
| index 589599613bd9f94db0b21463db2470d7bfccc05f..5e8a0dadfc5205d57da4b33107909d3fdf7ca083 100644
|
| --- a/Source/bindings/v8/V8DOMWrapper.h
|
| +++ b/Source/bindings/v8/V8DOMWrapper.h
|
| @@ -52,6 +52,7 @@ struct WrapperTypeInfo;
|
| template<typename V8T, typename T>
|
| static inline v8::Handle<v8::Object> associateObjectWithWrapper(T*, const WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate*, WrapperConfiguration::Lifetime);
|
| static inline void setNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*, void*);
|
| + static inline void setNativeInfoForHiddenWrapper(v8::Handle<v8::Object>, const WrapperTypeInfo*, void*);
|
| static inline void setNativeInfoWithPersistentHandle(v8::Handle<v8::Object>, const WrapperTypeInfo*, void*, PersistentNode*);
|
| static inline void clearNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*);
|
|
|
| @@ -70,6 +71,22 @@ struct WrapperTypeInfo;
|
| wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(type));
|
| }
|
|
|
| + inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* type, void* object)
|
| + {
|
| + // see V8WindowShell::installDOMWindow() comment for why this version is needed and safe.
|
| + ASSERT(wrapper->InternalFieldCount() >= 2);
|
| + ASSERT(object);
|
| + ASSERT(type);
|
| +#if ENABLE(OILPAN)
|
| + ASSERT(type->isGarbageCollected);
|
| +#endif
|
| + wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, object);
|
| + wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(type));
|
| + // Clear out the last internal field, which is assumed to contain a valid persistent pointer value.
|
| + wrapper->SetAlignedPointerInInternalField(wrapper->InternalFieldCount() - 1, 0);
|
| + }
|
| +
|
| +
|
| inline void V8DOMWrapper::setNativeInfoWithPersistentHandle(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* type, void* object, PersistentNode* handle)
|
| {
|
| ASSERT(wrapper->InternalFieldCount() >= 3);
|
|
|