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

Unified Diff: Source/bindings/tests/results/V8TestInterface.h

Issue 456683002: bindings: Introduces type-check for the internal pointers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/bindings/tests/results/V8TestInterface.h
diff --git a/Source/bindings/tests/results/V8TestInterface.h b/Source/bindings/tests/results/V8TestInterface.h
index ad66f636d289a5759a7a7f5b8a8b295a63eeabab..562e23ff3401a2b1582c75a52e17892061ab9993 100644
--- a/Source/bindings/tests/results/V8TestInterface.h
+++ b/Source/bindings/tests/results/V8TestInterface.h
@@ -8,6 +8,7 @@
#define V8TestInterface_h
#if ENABLE(CONDITION)
+#include "bindings/core/v8/ScriptWrappable.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8DOMWrapper.h"
#include "bindings/core/v8/WrapperTypeInfo.h"
@@ -24,12 +25,12 @@ public:
static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
static TestInterfaceImplementation* toNative(v8::Handle<v8::Object> object)
{
- return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
+ return fromInternalPointer(blink::toInternalPointer(object));
}
static TestInterfaceImplementation* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
static const WrapperTypeInfo wrapperTypeInfo;
- static void derefObject(void*);
- static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Isolate*);
+ static void derefObject(ScriptWrappableBase* internalPointer);
+ static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::Persistent<v8::Object>&, v8::Isolate*);
static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
static void implementsCustomVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&);
static bool shortMethodWithShortArgumentImplementedInPrivateScriptMethodImplementedInPrivateScript(LocalFrame* frame, TestInterface* holderImpl, int value, int* result);
@@ -37,14 +38,14 @@ public:
static bool stringAttributeAttributeSetterImplementedInPrivateScript(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue);
static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&);
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
- static inline void* toInternalPointer(TestInterfaceImplementation* impl)
+ static inline ScriptWrappableBase* toInternalPointer(TestInterfaceImplementation* impl)
{
return V8TestInterfaceEmpty::toInternalPointer(impl);
}
- static inline TestInterfaceImplementation* fromInternalPointer(void* object)
+ static inline TestInterfaceImplementation* fromInternalPointer(ScriptWrappableBase* internalPointer)
{
- return static_cast<TestInterfaceImplementation*>(V8TestInterfaceEmpty::fromInternalPointer(object));
+ return static_cast<TestInterfaceImplementation*>(V8TestInterfaceEmpty::fromInternalPointer(internalPointer));
}
static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestInterfaceImplementation*, v8::Isolate*);
static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*);

Powered by Google App Engine
This is Rietveld 408576698