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

Side by Side Diff: Source/bindings/tests/results/V8TestInterface3.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #ifndef V8TestInterface3_h 7 #ifndef V8TestInterface3_h
8 #define V8TestInterface3_h 8 #define V8TestInterface3_h
9 9
10 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "bindings/core/v8/V8Binding.h" 11 #include "bindings/core/v8/V8Binding.h"
11 #include "bindings/core/v8/V8DOMWrapper.h" 12 #include "bindings/core/v8/V8DOMWrapper.h"
12 #include "bindings/core/v8/WrapperTypeInfo.h" 13 #include "bindings/core/v8/WrapperTypeInfo.h"
13 #include "bindings/tests/idls/TestInterface3.h" 14 #include "bindings/tests/idls/TestInterface3.h"
14 #include "platform/heap/Handle.h" 15 #include "platform/heap/Handle.h"
15 16
16 namespace blink { 17 namespace blink {
17 18
18 class V8TestInterface3 { 19 class V8TestInterface3 {
19 public: 20 public:
20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); 21 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*); 22 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*);
22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); 23 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
23 static TestInterface3* toNative(v8::Handle<v8::Object> object) 24 static TestInterface3* toNative(v8::Handle<v8::Object> object)
24 { 25 {
25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 26 return fromInternalPointer(blink::toInternalPointer(object));
26 } 27 }
27 static TestInterface3* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Va lue>); 28 static TestInterface3* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Va lue>);
28 static const WrapperTypeInfo wrapperTypeInfo; 29 static const WrapperTypeInfo wrapperTypeInfo;
29 static void derefObject(void*); 30 static void derefObject(ScriptWrappableBase* internalPointer);
30 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is olate*); 31 static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8:: Persistent<v8::Object>&, v8::Isolate*);
31 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&); 32 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&);
32 static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, cons t v8::PropertyCallbackInfo<v8::Value>&); 33 static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, cons t v8::PropertyCallbackInfo<v8::Value>&);
33 static void indexedPropertyDeleterCustom(uint32_t, const v8::PropertyCallbac kInfo<v8::Boolean>&); 34 static void indexedPropertyDeleterCustom(uint32_t, const v8::PropertyCallbac kInfo<v8::Boolean>&);
34 static void namedPropertyGetterCustom(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>&); 35 static void namedPropertyGetterCustom(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>&);
35 static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::V alue>, const v8::PropertyCallbackInfo<v8::Value>&); 36 static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::V alue>, const v8::PropertyCallbackInfo<v8::Value>&);
36 static void namedPropertyQueryCustom(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Integer>&); 37 static void namedPropertyQueryCustom(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Integer>&);
37 static void namedPropertyDeleterCustom(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Boolean>&); 38 static void namedPropertyDeleterCustom(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Boolean>&);
38 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8: :Array>&); 39 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8: :Array>&);
39 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 40 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
40 static inline void* toInternalPointer(TestInterface3* impl) 41 static inline ScriptWrappableBase* toInternalPointer(TestInterface3* impl)
41 { 42 {
42 return impl; 43 return reinterpret_cast<ScriptWrappableBase*>(static_cast<void*>(impl));
43 } 44 }
44 45
45 static inline TestInterface3* fromInternalPointer(void* object) 46 static inline TestInterface3* fromInternalPointer(ScriptWrappableBase* inter nalPointer)
46 { 47 {
47 return static_cast<TestInterface3*>(object); 48 return reinterpret_cast<TestInterface3*>(static_cast<void*>(internalPoin ter));
48 } 49 }
49 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterface3*, v8::Isolate*) { } 50 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterface3*, v8::Isolate*) { }
50 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 51 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
51 52
52 private: 53 private:
53 friend v8::Handle<v8::Object> wrap(TestInterface3*, v8::Handle<v8::Object> c reationContext, v8::Isolate*); 54 friend v8::Handle<v8::Object> wrap(TestInterface3*, v8::Handle<v8::Object> c reationContext, v8::Isolate*);
54 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterface3>, v8:: Handle<v8::Object> creationContext, v8::Isolate*); 55 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterface3>, v8:: Handle<v8::Object> creationContext, v8::Isolate*);
55 }; 56 };
56 57
57 v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate*); 58 v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate*);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 125 }
125 126
126 template<class CallbackInfo, class Wrappable> 127 template<class CallbackInfo, class Wrappable>
127 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterface3> impl, Wrappable* wrappable) 128 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterface3> impl, Wrappable* wrappable)
128 { 129 {
129 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 130 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
130 } 131 }
131 132
132 } 133 }
133 #endif // V8TestInterface3_h 134 #endif // V8TestInterface3_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/bindings/tests/results/V8TestInterface3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698