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

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

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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
Index: Source/bindings/v8/custom/V8ArrayBufferCustom.cpp
diff --git a/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp b/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp
index 1542628b972c32cc4f2c94f3727b668ce75ab822..e5f970711ad27864f20bbc474ee560bf1f031f45 100644
--- a/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp
+++ b/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp
@@ -71,13 +71,13 @@ void V8ArrayBuffer::derefObject(void* object)
v8::Handle<v8::Object> V8ArrayBuffer::createWrapper(PassRefPtr<ArrayBuffer> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl.get());
- ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty());
+ ASSERT(DOMDataStore::getWrapper<V8ArrayBuffer>(impl.get(), isolate).IsEmpty());
v8::Handle<v8::Object> wrapper = v8::ArrayBuffer::New(impl->data(), impl->byteLength());
v8::V8::AdjustAmountOfExternalAllocatedMemory(impl->byteLength());
impl->setDeallocationObserver(V8ArrayBufferDeallocationObserver::instance());
- V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
+ V8DOMWrapper::associateObjectWithWrapper<V8ArrayBuffer>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
return wrapper;
}
@@ -96,7 +96,7 @@ ArrayBuffer* V8ArrayBuffer::toNative(v8::Handle<v8::Object> object)
RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(contents);
// V8 accounts for external memory even after externalizing the buffer.
buffer->setDeallocationObserver(V8ArrayBufferDeallocationObserver::instance());
- V8DOMWrapper::associateObjectWithWrapper(buffer.release(), &info, object, v8::Isolate::GetCurrent(), WrapperConfiguration::Dependent);
+ V8DOMWrapper::associateObjectWithWrapper<V8ArrayBuffer>(buffer.release(), &info, object, v8::Isolate::GetCurrent(), WrapperConfiguration::Dependent);
arraybufferPtr = object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex);
ASSERT(arraybufferPtr);
« no previous file with comments | « Source/bindings/v8/custom/V8ArrayBufferCustom.h ('k') | Source/bindings/v8/custom/V8ArrayBufferViewCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698