| Index: Source/bindings/tests/results/V8TestInterface.h
|
| diff --git a/Source/bindings/tests/results/V8TestInterface.h b/Source/bindings/tests/results/V8TestInterface.h
|
| index 8ffd9c8973d18abde314669695cb6c2f0a8682cb..d33fd24df63efd2b0b7bc9e5badd38068d1a37e2 100644
|
| --- a/Source/bindings/tests/results/V8TestInterface.h
|
| +++ b/Source/bindings/tests/results/V8TestInterface.h
|
| @@ -36,7 +36,7 @@ public:
|
| static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWorldType);
|
| static TestInterface* toNative(v8::Handle<v8::Object> object)
|
| {
|
| - return reinterpret_cast<TestInterface*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
|
| + return fromWrappedType(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
|
| }
|
| static void derefObject(void*);
|
| static WrapperTypeInfo info;
|
| @@ -53,6 +53,15 @@ public:
|
| #endif // ENABLE(Condition22) || ENABLE(Condition23)
|
| static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
|
| static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
|
| + static inline void* toWrappedType(TestInterface* impl)
|
| + {
|
| + return impl;
|
| + }
|
| +
|
| + static inline TestInterface* fromWrappedType(void* object)
|
| + {
|
| + return static_cast<TestInterface*>(object);
|
| + }
|
| static void installPerContextProperties(v8::Handle<v8::Object>, TestInterface*, v8::Isolate*);
|
| static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
|
| private:
|
| @@ -70,7 +79,7 @@ public:
|
| inline v8::Handle<v8::Object> wrap(TestInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| {
|
| ASSERT(impl);
|
| - ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
|
| + ASSERT(DOMDataStore::getWrapper<V8TestInterface>(impl, isolate).IsEmpty());
|
| if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
|
| const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl);
|
| // Might be a XXXConstructor::info instead of an XXX::info. These will both have
|
| @@ -84,7 +93,7 @@ inline v8::Handle<v8::Value> toV8(TestInterface* impl, v8::Handle<v8::Object> cr
|
| {
|
| if (UNLIKELY(!impl))
|
| return v8NullWithCheck(isolate);
|
| - v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
|
| + v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterface>(impl, isolate);
|
| if (!wrapper.IsEmpty())
|
| return wrapper;
|
| return wrap(impl, creationContext, isolate);
|
| @@ -95,7 +104,7 @@ inline v8::Handle<v8::Value> toV8ForMainWorld(TestInterface* impl, v8::Handle<v8
|
| ASSERT(worldType(isolate) == MainWorld);
|
| if (UNLIKELY(!impl))
|
| return v8NullWithCheck(isolate);
|
| - v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
|
| + v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld<V8TestInterface>(impl);
|
| if (!wrapper.IsEmpty())
|
| return wrapper;
|
| return wrap(impl, creationContext, isolate);
|
| @@ -106,7 +115,7 @@ inline v8::Handle<v8::Value> toV8Fast(TestInterface* impl, const HolderContainer
|
| {
|
| if (UNLIKELY(!impl))
|
| return v8::Null(container.GetIsolate());
|
| - v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
|
| + v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast<V8TestInterface>(impl, container, wrappable);
|
| if (!wrapper.IsEmpty())
|
| return wrapper;
|
| return wrap(impl, container.Holder(), container.GetIsolate());
|
| @@ -118,7 +127,7 @@ inline v8::Handle<v8::Value> toV8FastForMainWorld(TestInterface* impl, const Hol
|
| ASSERT(worldType(container.GetIsolate()) == MainWorld);
|
| if (UNLIKELY(!impl))
|
| return v8::Null(container.GetIsolate());
|
| - v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
|
| + v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld<V8TestInterface>(impl);
|
| if (!wrapper.IsEmpty())
|
| return wrapper;
|
| return wrap(impl, container.Holder(), container.GetIsolate());
|
|
|