Lines Matching refs:wrapper
51 static inline v8::Handle<v8::Object> associateObjectWithWrapper(RawPtr<T> object, const WrapperTypeInfo* wrapperTypeInfo, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, WrapperConfiguration::Lifetime lifetime)
53 return associateObjectWithWrapper<V8T, T>(object.get(), wrapperTypeInfo, wrapper, isolate, lifetime);
65 inline void V8DOMWrapper::setNativeInfo(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo, void* object)
67 ASSERT(wrapper->InternalFieldCount() >= 2);
75 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, object);
76 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
79 inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo, void* object)
82 ASSERT(wrapper->InternalFieldCount() >= 2);
93 wrapper->SetAlignedPointerInInternalField(wrapper->InternalFieldCount() - 1, 0);
96 wrapper->SetAlignedPointerInInternalField(wrapper->InternalFieldCount() - 1, 0);
99 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, object);
100 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
103 inline void V8DOMWrapper::setNativeInfoWithPersistentHandle(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo, void* object, PersistentNode* handle)
105 ASSERT(wrapper->InternalFieldCount() >= 3);
109 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, object);
110 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
112 wrapper->SetAlignedPointerInInternalField(wrapper->InternalFieldCount() - 1, handle);
115 inline void V8DOMWrapper::clearNativeInfo(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo)
117 ASSERT(wrapper->InternalFieldCount() >= 2);
121 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
122 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, 0);
126 inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<T> object, const WrapperTypeInfo* wrapperTypeInfo, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, WrapperConfiguration::Lifetime lifetime)
128 setNativeInfo(wrapper, wrapperTypeInfo, V8T::toInternalPointer(object.get()));
129 ASSERT(isDOMWrapper(wrapper));
131 DOMDataStore::setWrapper<V8T>(object.leakRef(), wrapper, isolate, configuration);
132 return wrapper;
136 inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(T* object, const WrapperTypeInfo* wrapperTypeInfo, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, WrapperConfiguration::Lifetime lifetime)
138 setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, V8T::toInternalPointer(object), new Persistent<T>(object));
139 ASSERT(isDOMWrapper(wrapper));
141 DOMDataStore::setWrapper<V8T>(object, wrapper, isolate, configuration);
142 return wrapper;