| Index: Source/bindings/v8/custom/V8ArrayBufferCustom.h
|
| diff --git a/Source/bindings/v8/custom/V8ArrayBufferCustom.h b/Source/bindings/v8/custom/V8ArrayBufferCustom.h
|
| index 2d7cb39f0f38fca44690e9f466a9b0887192dc46..27059a7dd663de65bc5121caf39feeeb19f2bdf0 100644
|
| --- a/Source/bindings/v8/custom/V8ArrayBufferCustom.h
|
| +++ b/Source/bindings/v8/custom/V8ArrayBufferCustom.h
|
| @@ -26,13 +26,8 @@
|
| #ifndef V8ArrayBufferCustom_h
|
| #define V8ArrayBufferCustom_h
|
|
|
| -#include "bindings/v8/V8Binding.h"
|
| -#include "bindings/v8/V8DOMWrapper.h"
|
| -#include "bindings/v8/WrapperTypeInfo.h"
|
| -
|
| -#include "wtf/ArrayBuffer.h"
|
| -
|
| #include <v8.h>
|
| +#include "wtf/ArrayBuffer.h"
|
|
|
| namespace WebCore {
|
|
|
| @@ -45,97 +40,6 @@ public:
|
| static V8ArrayBufferDeallocationObserver* instance();
|
| };
|
|
|
| -class V8ArrayBuffer {
|
| -public:
|
| - static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldType);
|
| - static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*);
|
| - static ArrayBuffer* toNative(v8::Handle<v8::Object>);
|
| - static void derefObject(void*);
|
| - static WrapperTypeInfo info;
|
| - static const int internalFieldCount = v8DefaultWrapperInternalFieldCount;
|
| - static void installPerContextProperties(v8::Handle<v8::Object>, ArrayBuffer*, v8::Isolate*) { }
|
| - static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8::Isolate*) { }
|
| -private:
|
| - friend v8::Handle<v8::Object> wrap(ArrayBuffer*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - static v8::Handle<v8::Object> createWrapper(PassRefPtr<ArrayBuffer>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| -};
|
| -
|
| -template<>
|
| -class WrapperTypeTraits<ArrayBuffer > {
|
| -public:
|
| - static WrapperTypeInfo* info() { return &V8ArrayBuffer::info; }
|
| -};
|
| -
|
| -
|
| -inline v8::Handle<v8::Object> wrap(ArrayBuffer* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| -{
|
| - ASSERT(impl);
|
| - ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
|
| - return V8ArrayBuffer::createWrapper(impl, creationContext, isolate);
|
| }
|
|
|
| -inline v8::Handle<v8::Value> toV8(ArrayBuffer* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| -{
|
| - if (UNLIKELY(!impl))
|
| - return v8NullWithCheck(isolate);
|
| - v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
|
| - if (!wrapper.IsEmpty())
|
| - return wrapper;
|
| - return wrap(impl, creationContext, isolate);
|
| -}
|
| -
|
| -inline v8::Handle<v8::Value> toV8ForMainWorld(ArrayBuffer* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| -{
|
| - ASSERT(worldType(isolate) == MainWorld);
|
| - if (UNLIKELY(!impl))
|
| - return v8NullWithCheck(isolate);
|
| - v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
|
| - if (!wrapper.IsEmpty())
|
| - return wrapper;
|
| - return wrap(impl, creationContext, isolate);
|
| -}
|
| -
|
| -template<class HolderContainer, class Wrappable>
|
| -inline v8::Handle<v8::Value> toV8Fast(ArrayBuffer* impl, const HolderContainer& container, Wrappable* wrappable)
|
| -{
|
| - if (UNLIKELY(!impl))
|
| - return v8Null(container.GetIsolate());
|
| - v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, container, wrappable);
|
| - if (!wrapper.IsEmpty())
|
| - return wrapper;
|
| - return wrap(impl, container.Holder(), container.GetIsolate());
|
| -}
|
| -
|
| -template<class HolderContainer, class Wrappable>
|
| -inline v8::Handle<v8::Value> toV8FastForMainWorld(ArrayBuffer* impl, const HolderContainer& container, Wrappable* wrappable)
|
| -{
|
| - ASSERT(worldType(container.GetIsolate()) == MainWorld);
|
| - if (UNLIKELY(!impl))
|
| - return v8Null(container.GetIsolate());
|
| - v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
|
| - if (!wrapper.IsEmpty())
|
| - return wrapper;
|
| - return wrap(impl, container.Holder(), container.GetIsolate());
|
| -}
|
| -
|
| -template<class HolderContainer, class Wrappable>
|
| -inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< ArrayBuffer > impl, const HolderContainer& container, Wrappable* wrappable)
|
| -{
|
| - return toV8FastForMainWorld(impl.get(), container, wrappable);
|
| -}
|
| -
|
| -
|
| -template<class HolderContainer, class Wrappable>
|
| -inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< ArrayBuffer > impl, const HolderContainer& container, Wrappable* wrappable)
|
| -{
|
| - return toV8Fast(impl.get(), container, wrappable);
|
| -}
|
| -
|
| -inline v8::Handle<v8::Value> toV8(PassRefPtr< ArrayBuffer > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| -{
|
| - return toV8(impl.get(), creationContext, isolate);
|
| -}
|
| -
|
| -} // namespace WebCore
|
| -
|
| #endif // V8ArrayBufferCustom_h
|
|
|