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

Unified Diff: Source/bindings/tests/results/V8TestObject.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/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 52c00b41405ad6dd3f23d11c8188a28c1bb935bc..641c26f17df133c57db671b51a9a32e7f066078b 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -125,7 +125,7 @@ static void readOnlyTestObjectAttrAttrGetter(v8::Local<v8::String> name, const v
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->readOnlyTestObjectAttr();
- v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper(result.get(), info.GetIsolate())) : v8Undefined();
+ v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper<V8TestObject>(result.get(), info.GetIsolate())) : v8Undefined();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty())
@@ -2285,7 +2285,7 @@ static void perWorldReadOnlyAttributeAttrGetter(v8::Local<v8::String> name, cons
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute();
- v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper(result.get(), info.GetIsolate())) : v8Undefined();
+ v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper<V8TestObject>(result.get(), info.GetIsolate())) : v8Undefined();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty())
@@ -2306,7 +2306,7 @@ static void perWorldReadOnlyAttributeAttrGetterForMainWorld(v8::Local<v8::String
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute();
- v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapperForMainWorld(result.get())) : v8Undefined();
+ v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapperForMainWorld<V8TestObject>(result.get())) : v8Undefined();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty())
@@ -5150,7 +5150,7 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
RefPtr<TestObj> impl = TestObj::create(testCallback);
v8::Handle<v8::Object> wrapper = args.Holder();
- V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestObject::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
+ V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl.release(), &V8TestObject::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
args.GetReturnValue().Set(wrapper);
}
@@ -5732,18 +5732,18 @@ void V8TestObject::installPerContextPrototypeProperties(v8::Handle<v8::Object> p
v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl.get());
- ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty());
+ ASSERT(DOMDataStore::getWrapper<V8TestObject>(impl.get(), isolate).IsEmpty());
- v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, impl.get(), isolate);
+ v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, toInternalPointer(impl.get()), isolate);
if (UNLIKELY(wrapper.IsEmpty()))
return wrapper;
installPerContextProperties(wrapper, impl.get(), isolate);
- V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
+ V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
return wrapper;
}
void V8TestObject::derefObject(void* object)
{
- static_cast<TestObj*>(object)->deref();
+ fromInternalPointer(object)->deref();
}
} // namespace WebCore
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.h ('k') | Source/bindings/tests/results/V8TestOverloadedConstructors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698