| Index: Source/bindings/tests/results/V8TestCustomToV8Interface.h
|
| diff --git a/Source/bindings/tests/results/V8TestCustomWrapInterface.h b/Source/bindings/tests/results/V8TestCustomToV8Interface.h
|
| similarity index 54%
|
| copy from Source/bindings/tests/results/V8TestCustomWrapInterface.h
|
| copy to Source/bindings/tests/results/V8TestCustomToV8Interface.h
|
| index 823660398fa109da4cf7b5ee02edee06d026f975..4b625d0b061d1fb391c9b19502cbe8c900487504 100644
|
| --- a/Source/bindings/tests/results/V8TestCustomWrapInterface.h
|
| +++ b/Source/bindings/tests/results/V8TestCustomToV8Interface.h
|
| @@ -30,125 +30,92 @@
|
|
|
| // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
|
|
|
| -#ifndef V8TestCustomWrapInterface_h
|
| -#define V8TestCustomWrapInterface_h
|
| +#ifndef V8TestCustomToV8Interface_h
|
| +#define V8TestCustomToV8Interface_h
|
|
|
| -#include "bindings/tests/idls/TestCustomWrapInterface.h"
|
| +#include "bindings/tests/idls/TestCustomToV8Interface.h"
|
| #include "bindings/v8/V8Binding.h"
|
| #include "bindings/v8/V8DOMWrapper.h"
|
| #include "bindings/v8/WrapperTypeInfo.h"
|
|
|
| namespace WebCore {
|
|
|
| -class V8TestCustomWrapInterface {
|
| +class V8TestCustomToV8Interface {
|
| public:
|
| static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldType);
|
| static bool hasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
|
| static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWorldType);
|
| - static TestCustomWrapInterface* toNative(v8::Handle<v8::Object> object)
|
| + static TestCustomToV8Interface* toNative(v8::Handle<v8::Object> object)
|
| {
|
| return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
|
| }
|
| static void derefObject(void*);
|
| static const WrapperTypeInfo wrapperTypeInfo;
|
| static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
|
| - static inline void* toInternalPointer(TestCustomWrapInterface* impl)
|
| + static inline void* toInternalPointer(TestCustomToV8Interface* impl)
|
| {
|
| return impl;
|
| }
|
|
|
| - static inline TestCustomWrapInterface* fromInternalPointer(void* object)
|
| + static inline TestCustomToV8Interface* fromInternalPointer(void* object)
|
| {
|
| - return static_cast<TestCustomWrapInterface*>(object);
|
| + return static_cast<TestCustomToV8Interface*>(object);
|
| }
|
| - static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestCustomWrapInterface*, v8::Isolate*) { }
|
| + static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestCustomToV8Interface*, v8::Isolate*) { }
|
| static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*) { }
|
|
|
| private:
|
| - friend v8::Handle<v8::Object> wrap(TestCustomWrapInterface*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestCustomWrapInterface>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| };
|
|
|
| template<>
|
| -class WrapperTypeTraits<TestCustomWrapInterface > {
|
| +class WrapperTypeTraits<TestCustomToV8Interface > {
|
| public:
|
| - static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestCustomWrapInterface::wrapperTypeInfo; }
|
| + static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestCustomToV8Interface::wrapperTypeInfo; }
|
| };
|
|
|
| -v8::Handle<v8::Object> wrap(TestCustomWrapInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| +class TestCustomToV8Interface;
|
| +v8::Handle<v8::Value> toV8(TestCustomToV8Interface*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
|
|
| -inline v8::Handle<v8::Value> toV8(TestCustomWrapInterface* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| -{
|
| - if (UNLIKELY(!impl))
|
| - return v8NullWithCheck(isolate);
|
| - v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestCustomWrapInterface>(impl, isolate);
|
| - if (!wrapper.IsEmpty())
|
| - return wrapper;
|
| - return wrap(impl, creationContext, isolate);
|
| -}
|
| -
|
| -template<typename CallbackInfo>
|
| -inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestCustomWrapInterface* impl)
|
| +template<class CallbackInfo>
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestCustomToV8Interface* impl)
|
| {
|
| - if (UNLIKELY(!impl)) {
|
| - v8SetReturnValueNull(callbackInfo);
|
| - return;
|
| - }
|
| - if (DOMDataStore::setReturnValueFromWrapper<V8TestCustomWrapInterface>(callbackInfo.GetReturnValue(), impl))
|
| - return;
|
| - v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackInfo.GetIsolate());
|
| - v8SetReturnValue(callbackInfo, wrapper);
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| }
|
|
|
| -template<typename CallbackInfo>
|
| -inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestCustomWrapInterface* impl)
|
| +template<class CallbackInfo>
|
| +inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestCustomToV8Interface* impl)
|
| {
|
| - ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld);
|
| - if (UNLIKELY(!impl)) {
|
| - v8SetReturnValueNull(callbackInfo);
|
| - return;
|
| - }
|
| - if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestCustomWrapInterface>(callbackInfo.GetReturnValue(), impl))
|
| - return;
|
| - v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackInfo.GetIsolate());
|
| - v8SetReturnValue(callbackInfo, wrapper);
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| }
|
|
|
| template<class CallbackInfo, class Wrappable>
|
| -inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestCustomWrapInterface* impl, Wrappable* wrappable)
|
| +inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestCustomToV8Interface* impl, Wrappable*)
|
| {
|
| - if (UNLIKELY(!impl)) {
|
| - v8SetReturnValueNull(callbackInfo);
|
| - return;
|
| - }
|
| - if (DOMDataStore::setReturnValueFromWrapperFast<V8TestCustomWrapInterface>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
|
| - return;
|
| - v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackInfo.GetIsolate());
|
| - v8SetReturnValue(callbackInfo, wrapper);
|
| + v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| }
|
|
|
| -inline v8::Handle<v8::Value> toV8(PassRefPtr<TestCustomWrapInterface > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| +inline v8::Handle<v8::Value> toV8(PassRefPtr<TestCustomToV8Interface > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| {
|
| return toV8(impl.get(), creationContext, isolate);
|
| }
|
|
|
| template<class CallbackInfo>
|
| -inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestCustomWrapInterface > impl)
|
| +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestCustomToV8Interface > impl)
|
| {
|
| v8SetReturnValue(callbackInfo, impl.get());
|
| }
|
|
|
| template<class CallbackInfo>
|
| -inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassRefPtr<TestCustomWrapInterface > impl)
|
| +inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassRefPtr<TestCustomToV8Interface > impl)
|
| {
|
| v8SetReturnValueForMainWorld(callbackInfo, impl.get());
|
| }
|
|
|
| template<class CallbackInfo, class Wrappable>
|
| -inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<TestCustomWrapInterface > impl, Wrappable* wrappable)
|
| +inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<TestCustomToV8Interface > impl, Wrappable* wrappable)
|
| {
|
| v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
|
| }
|
|
|
| }
|
| -#endif // V8TestCustomWrapInterface_h
|
| +#endif // V8TestCustomToV8Interface_h
|
|
|