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

Unified Diff: Source/bindings/v8/WrapperTypeInfo.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/WorkerScriptController.cpp ('k') | Source/bindings/v8/custom/V8ArrayBufferCustom.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/WrapperTypeInfo.h
diff --git a/Source/bindings/v8/WrapperTypeInfo.h b/Source/bindings/v8/WrapperTypeInfo.h
index abbeb028f59cacfe7393335e6b24a1035529605a..9b7a3aa2b0ab8adc37ef9b1ad264df20eeab8825 100644
--- a/Source/bindings/v8/WrapperTypeInfo.h
+++ b/Source/bindings/v8/WrapperTypeInfo.h
@@ -73,9 +73,9 @@ namespace WebCore {
// comparing pointers is a safe way to determine if types match.
struct WrapperTypeInfo {
- static WrapperTypeInfo* unwrap(v8::Handle<v8::Value> typeInfoWrapper)
+ static const WrapperTypeInfo* unwrap(v8::Handle<v8::Value> typeInfoWrapper)
{
- return reinterpret_cast<WrapperTypeInfo*>(v8::External::Cast(*typeInfoWrapper)->Value());
+ return reinterpret_cast<const WrapperTypeInfo*>(v8::External::Cast(*typeInfoWrapper)->Value());
}
@@ -94,35 +94,35 @@ namespace WebCore {
return false;
}
- v8::Handle<v8::FunctionTemplate> getTemplate(v8::Isolate* isolate, WrapperWorldType worldType) { return getTemplateFunction(isolate, worldType); }
+ v8::Handle<v8::FunctionTemplate> getTemplate(v8::Isolate* isolate, WrapperWorldType worldType) const { return getTemplateFunction(isolate, worldType); }
- void derefObject(void* object)
+ void derefObject(void* object) const
{
if (derefObjectFunction)
derefObjectFunction(object);
}
- void installPerContextEnabledPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate)
+ void installPerContextEnabledPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate) const
{
if (installPerContextEnabledPrototypePropertiesFunction)
installPerContextEnabledPrototypePropertiesFunction(proto, isolate);
}
- ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object> object)
+ ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object> object) const
{
if (!toActiveDOMObjectFunction)
return 0;
return toActiveDOMObjectFunction(object);
}
- EventTarget* toEventTarget(v8::Handle<v8::Object> object)
+ EventTarget* toEventTarget(v8::Handle<v8::Object> object) const
{
if (!toEventTargetFunction)
return 0;
return toEventTargetFunction(object);
}
- void* opaqueRootForGC(void* object, v8::Isolate* isolate)
+ void* opaqueRootForGC(void* object, v8::Isolate* isolate) const
{
if (!opaqueRootForGCFunction)
return object;
@@ -165,12 +165,12 @@ namespace WebCore {
return getInternalField<void, v8DOMWrapperObjectIndex>(object);
}
- inline WrapperTypeInfo* toWrapperTypeInfo(const v8::Persistent<v8::Object>& object)
+ inline const WrapperTypeInfo* toWrapperTypeInfo(const v8::Persistent<v8::Object>& object)
{
return getInternalField<WrapperTypeInfo, v8DOMWrapperTypeIndex>(object);
}
- inline WrapperTypeInfo* toWrapperTypeInfo(v8::Handle<v8::Object> object)
+ inline const WrapperTypeInfo* toWrapperTypeInfo(v8::Handle<v8::Object> object)
{
return getInternalField<WrapperTypeInfo, v8DOMWrapperTypeIndex>(object);
}
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/bindings/v8/custom/V8ArrayBufferCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698