Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: Source/bindings/v8/custom/V8ArrayBufferCustom.h

Issue 18316003: Revert "Use V8 implementation of ArrayBuffer in Blink." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8Utilities.cpp ('k') | Source/bindings/v8/custom/V8ArrayBufferCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/bindings/v8/V8Utilities.cpp ('k') | Source/bindings/v8/custom/V8ArrayBufferCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698