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

Unified Diff: Source/bindings/core/v8/custom/V8ArrayBufferCustom.h

Issue 456683002: bindings: Introduces type-check for the internal pointers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 4 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/core/v8/WrapperTypeInfo.h ('k') | Source/bindings/core/v8/custom/V8ArrayBufferCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/custom/V8ArrayBufferCustom.h
diff --git a/Source/bindings/core/v8/custom/V8ArrayBufferCustom.h b/Source/bindings/core/v8/custom/V8ArrayBufferCustom.h
index 986e0f1033d20c4bd9d0dd3463c6665a2870a699..a6d9821f0b84124275b9a83e5327850cc0aac299 100644
--- a/Source/bindings/core/v8/custom/V8ArrayBufferCustom.h
+++ b/Source/bindings/core/v8/custom/V8ArrayBufferCustom.h
@@ -54,20 +54,20 @@ public:
static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
static ArrayBuffer* toNative(v8::Handle<v8::Object>);
static ArrayBuffer* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
- static void derefObject(void*);
+ static void derefObject(ScriptWrappableBase* internalPointer);
static const WrapperTypeInfo wrapperTypeInfo;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount;
static void installPerContextEnabledProperties(v8::Handle<v8::Object>, ArrayBuffer*, v8::Isolate*) { }
static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*) { }
- static inline void* toInternalPointer(ArrayBuffer* impl)
+ static inline ScriptWrappableBase* toInternalPointer(ArrayBuffer* impl)
{
- return impl;
+ return reinterpret_cast<ScriptWrappableBase*>(impl);
}
- static inline ArrayBuffer* fromInternalPointer(void* impl)
+ static inline ArrayBuffer* fromInternalPointer(ScriptWrappableBase* internalPointer)
{
- return static_cast<ArrayBuffer*>(impl);
+ return reinterpret_cast<ArrayBuffer*>(internalPointer);
}
private:
« no previous file with comments | « Source/bindings/core/v8/WrapperTypeInfo.h ('k') | Source/bindings/core/v8/custom/V8ArrayBufferCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698