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

Unified Diff: Source/bindings/v8/V8DOMWrapper.h

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the regressions 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/V8DOMWrapper.h
diff --git a/Source/bindings/v8/V8DOMWrapper.h b/Source/bindings/v8/V8DOMWrapper.h
index 9e274d79303fa4313db8b04aa72407c3658b4460..857d8f480241ac7714de8f7f923014c2b461f06c 100644
--- a/Source/bindings/v8/V8DOMWrapper.h
+++ b/Source/bindings/v8/V8DOMWrapper.h
@@ -49,7 +49,7 @@ struct WrapperTypeInfo;
static v8::Local<v8::Object> createWrapper(v8::Handle<v8::Object> creationContext, WrapperTypeInfo*, void*, v8::Isolate*);
- template<typename T>
+ template<typename V8T, typename T>
static inline v8::Handle<v8::Object> associateObjectWithWrapper(PassRefPtr<T>, WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate*, WrapperConfiguration::Lifetime);
static inline void setNativeInfo(v8::Handle<v8::Object>, WrapperTypeInfo*, void*);
static inline void clearNativeInfo(v8::Handle<v8::Object>, WrapperTypeInfo*);
@@ -75,13 +75,13 @@ struct WrapperTypeInfo;
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, 0);
}
- template<typename T>
+ template<typename V8T, typename T>
inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<T> object, WrapperTypeInfo* type, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, WrapperConfiguration::Lifetime lifetime)
{
- setNativeInfo(wrapper, type, object.get());
+ setNativeInfo(wrapper, type, V8T::toWrappedType(object.get()));
ASSERT(maybeDOMWrapper(wrapper));
WrapperConfiguration configuration = buildWrapperConfiguration(object.get(), lifetime);
- DOMDataStore::setWrapper(object.leakRef(), wrapper, isolate, configuration);
+ DOMDataStore::setWrapper<V8T>(object.leakRef(), wrapper, isolate, configuration);
return wrapper;
}

Powered by Google App Engine
This is Rietveld 408576698