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

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

Issue 40433002: Make wrapperTypeInfo static member const in bindings classes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 2 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/V8DOMConfiguration.h ('k') | Source/bindings/v8/V8DOMWrapper.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 035524e9a9f24ed8948d717c8c32d13e98b275a7..fd2f7a130aced3a0b37a0502fe038d0a6497ef24 100644
--- a/Source/bindings/v8/V8DOMWrapper.h
+++ b/Source/bindings/v8/V8DOMWrapper.h
@@ -47,36 +47,36 @@ struct WrapperTypeInfo;
static bool maybeDOMWrapper(v8::Handle<v8::Value>);
#endif
- static v8::Local<v8::Object> createWrapper(v8::Handle<v8::Object> creationContext, WrapperTypeInfo*, void*, v8::Isolate*);
+ static v8::Local<v8::Object> createWrapper(v8::Handle<v8::Object> creationContext, const WrapperTypeInfo*, void*, v8::Isolate*);
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*);
+ static inline v8::Handle<v8::Object> associateObjectWithWrapper(PassRefPtr<T>, const WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate*, WrapperConfiguration::Lifetime);
+ static inline void setNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*, void*);
+ static inline void clearNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*);
static bool isDOMWrapper(v8::Handle<v8::Value>);
- static bool isWrapperOfType(v8::Handle<v8::Value>, WrapperTypeInfo*);
+ static bool isWrapperOfType(v8::Handle<v8::Value>, const WrapperTypeInfo*);
};
- inline void V8DOMWrapper::setNativeInfo(v8::Handle<v8::Object> wrapper, WrapperTypeInfo* type, void* object)
+ inline void V8DOMWrapper::setNativeInfo(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* type, void* object)
{
ASSERT(wrapper->InternalFieldCount() >= 2);
ASSERT(object);
ASSERT(type);
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, object);
- wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, type);
+ wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(type));
}
- inline void V8DOMWrapper::clearNativeInfo(v8::Handle<v8::Object> wrapper, WrapperTypeInfo* type)
+ inline void V8DOMWrapper::clearNativeInfo(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* type)
{
ASSERT(wrapper->InternalFieldCount() >= 2);
ASSERT(type);
- wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, type);
+ wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(type));
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, 0);
}
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)
+ inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(PassRefPtr<T> object, const WrapperTypeInfo* type, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, WrapperConfiguration::Lifetime lifetime)
{
setNativeInfo(wrapper, type, V8T::toInternalPointer(object.get()));
ASSERT(maybeDOMWrapper(wrapper));
« no previous file with comments | « Source/bindings/v8/V8DOMConfiguration.h ('k') | Source/bindings/v8/V8DOMWrapper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698