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

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: 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
« no previous file with comments | « Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp ('k') | Source/bindings/v8/V8WindowShell.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8DOMWrapper.h
diff --git a/Source/bindings/v8/V8DOMWrapper.h b/Source/bindings/v8/V8DOMWrapper.h
index 9e274d79303fa4313db8b04aa72407c3658b4460..8fbfe9cb40e11d3c03c53f45c2840f09e85ab12f 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::toInternalPointer(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;
}
« no previous file with comments | « Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp ('k') | Source/bindings/v8/V8WindowShell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698