X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fbindings%2Fv8%2Fcustom%2FV8ArrayBufferCustom.cpp;h=497caec7c2613a3f2356d694dd0da14b17572e92;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=c37ed6af1605ab59d0cef89c27d8e4889e0a1aaf;hpb=172ee7c03df346ff158858709f7f6494e695e0e4;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp b/src/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp index c37ed6a..497caec 100644 --- a/src/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp +++ b/src/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp @@ -39,23 +39,19 @@ namespace WebCore { using namespace WTF; -V8ArrayBufferDeallocationObserver* V8ArrayBufferDeallocationObserver::instance() +V8ArrayBufferDeallocationObserver* V8ArrayBufferDeallocationObserver::instanceTemplate() { DEFINE_STATIC_LOCAL(V8ArrayBufferDeallocationObserver, deallocationObserver, ()); return &deallocationObserver; } const WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = { + gin::kEmbedderBlink, 0, V8ArrayBuffer::derefObject, - 0, 0, 0, 0, 0, WrapperTypeObjectPrototype + 0, 0, 0, 0, 0, WrapperTypeObjectPrototype, false }; -bool V8ArrayBuffer::HasInstance(v8::Handle value, v8::Isolate*, WrapperWorldType) -{ - return value->IsArrayBuffer(); -} - -bool V8ArrayBuffer::HasInstanceInAnyWorld(v8::Handle value, v8::Isolate*) +bool V8ArrayBuffer::hasInstance(v8::Handle value, v8::Isolate*) { return value->IsArrayBuffer(); } @@ -70,8 +66,8 @@ v8::Handle V8ArrayBuffer::createWrapper(PassRefPtr impl ASSERT(impl.get()); ASSERT(!DOMDataStore::containsWrapper(impl.get(), isolate)); - v8::Handle wrapper = v8::ArrayBuffer::New(impl->data(), impl->byteLength()); - impl->setDeallocationObserver(V8ArrayBufferDeallocationObserver::instance()); + v8::Handle wrapper = v8::ArrayBuffer::New(isolate, impl->data(), impl->byteLength()); + impl->setDeallocationObserver(V8ArrayBufferDeallocationObserver::instanceTemplate()); V8DOMWrapper::associateObjectWithWrapper(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); return wrapper; @@ -89,7 +85,7 @@ ArrayBuffer* V8ArrayBuffer::toNative(v8::Handle object) v8::ArrayBuffer::Contents v8Contents = v8buffer->Externalize(); ArrayBufferContents contents(v8Contents.Data(), v8Contents.ByteLength(), - V8ArrayBufferDeallocationObserver::instance()); + V8ArrayBufferDeallocationObserver::instanceTemplate()); RefPtr buffer = ArrayBuffer::create(contents); V8DOMWrapper::associateObjectWithWrapper(buffer.release(), &wrapperTypeInfo, object, v8::Isolate::GetCurrent(), WrapperConfiguration::Dependent); @@ -98,4 +94,10 @@ ArrayBuffer* V8ArrayBuffer::toNative(v8::Handle object) return reinterpret_cast(arraybufferPtr); } +template<> +v8::Handle toV8NoInline(ArrayBuffer* impl, v8::Handle creationContext, v8::Isolate* isolate) +{ + return toV8(impl, creationContext, isolate); +} + } // namespace WebCore