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

Side by Side Diff: Source/bindings/tests/results/V8TestInterface3.h

Issue 213543004: Consolidate IDL test cases (15%: 34 => 29) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reupload Created 6 years, 9 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 V8TestSpecialOperationsCustom_h 7 #ifndef V8TestInterface3_h
8 #define V8TestSpecialOperationsCustom_h 8 #define V8TestInterface3_h
9 9
10 #include "bindings/tests/idls/TestSpecialOperationsCustom.h" 10 #include "bindings/tests/idls/TestInterface3.h"
11 #include "bindings/v8/V8Binding.h" 11 #include "bindings/v8/V8Binding.h"
12 #include "bindings/v8/V8DOMWrapper.h" 12 #include "bindings/v8/V8DOMWrapper.h"
13 #include "bindings/v8/WrapperTypeInfo.h" 13 #include "bindings/v8/WrapperTypeInfo.h"
14 #include "heap/Handle.h" 14 #include "heap/Handle.h"
15 15
16 namespace WebCore { 16 namespace WebCore {
17 17
18 class V8TestSpecialOperationsCustom { 18 class V8TestInterface3 {
19 public: 19 public:
20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); 20 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*); 21 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*);
22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); 22 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
23 static TestSpecialOperationsCustom* toNative(v8::Handle<v8::Object> object) 23 static TestInterface3* toNative(v8::Handle<v8::Object> object)
24 { 24 {
25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 25 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
26 } 26 }
27 static TestSpecialOperationsCustom* toNativeWithTypeCheck(v8::Isolate*, v8:: Handle<v8::Value>); 27 static TestInterface3* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Va lue>);
28 static const WrapperTypeInfo wrapperTypeInfo; 28 static const WrapperTypeInfo wrapperTypeInfo;
29 static void derefObject(void*); 29 static void derefObject(void*);
30 static void visitDOMWrapper(void*, const v8::Persistent<v8::Object>&, v8::Is olate*);
30 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&); 31 static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallback Info<v8::Value>&);
31 static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, cons t v8::PropertyCallbackInfo<v8::Value>&); 32 static void indexedPropertySetterCustom(uint32_t, v8::Local<v8::Value>, cons t v8::PropertyCallbackInfo<v8::Value>&);
32 static void indexedPropertyDeleterCustom(uint32_t, const v8::PropertyCallbac kInfo<v8::Boolean>&); 33 static void indexedPropertyDeleterCustom(uint32_t, const v8::PropertyCallbac kInfo<v8::Boolean>&);
33 static void namedPropertyGetterCustom(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>&); 34 static void namedPropertyGetterCustom(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>&);
34 static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::V alue>, const v8::PropertyCallbackInfo<v8::Value>&); 35 static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::V alue>, const v8::PropertyCallbackInfo<v8::Value>&);
35 static void namedPropertyQueryCustom(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Integer>&); 36 static void namedPropertyQueryCustom(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Integer>&);
36 static void namedPropertyDeleterCustom(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Boolean>&); 37 static void namedPropertyDeleterCustom(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Boolean>&);
37 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8: :Array>&); 38 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8: :Array>&);
38 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 39 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
39 static inline void* toInternalPointer(TestSpecialOperationsCustom* impl) 40 static inline void* toInternalPointer(TestInterface3* impl)
40 { 41 {
41 return impl; 42 return impl;
42 } 43 }
43 44
44 static inline TestSpecialOperationsCustom* fromInternalPointer(void* object) 45 static inline TestInterface3* fromInternalPointer(void* object)
45 { 46 {
46 return static_cast<TestSpecialOperationsCustom*>(object); 47 return static_cast<TestInterface3*>(object);
47 } 48 }
48 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestS pecialOperationsCustom*, v8::Isolate*) { } 49 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterface3*, v8::Isolate*) { }
49 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 50 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
50 51
51 private: 52 private:
52 friend v8::Handle<v8::Object> wrap(TestSpecialOperationsCustom*, v8::Handle< v8::Object> creationContext, v8::Isolate*); 53 friend v8::Handle<v8::Object> wrap(TestInterface3*, v8::Handle<v8::Object> c reationContext, v8::Isolate*);
53 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestSpecialOperations Custom>, v8::Handle<v8::Object> creationContext, v8::Isolate*); 54 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterface3>, v8:: Handle<v8::Object> creationContext, v8::Isolate*);
54 }; 55 };
55 56
56 inline v8::Handle<v8::Object> wrap(TestSpecialOperationsCustom* impl, v8::Handle <v8::Object> creationContext, v8::Isolate* isolate) 57 inline v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
57 { 58 {
58 ASSERT(impl); 59 ASSERT(impl);
59 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperationsCustom>(impl, i solate)); 60 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl, isolate));
60 return V8TestSpecialOperationsCustom::createWrapper(impl, creationContext, i solate); 61 return V8TestInterface3::createWrapper(impl, creationContext, isolate);
61 } 62 }
62 63
63 inline v8::Handle<v8::Value> toV8(TestSpecialOperationsCustom* impl, v8::Handle< v8::Object> creationContext, v8::Isolate* isolate) 64 inline v8::Handle<v8::Value> toV8(TestInterface3* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
64 { 65 {
65 if (UNLIKELY(!impl)) 66 if (UNLIKELY(!impl))
66 return v8::Null(isolate); 67 return v8::Null(isolate);
67 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestSpecialOperat ionsCustom>(impl, isolate); 68 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterface3>(i mpl, isolate);
68 if (!wrapper.IsEmpty()) 69 if (!wrapper.IsEmpty())
69 return wrapper; 70 return wrapper;
70 return wrap(impl, creationContext, isolate); 71 return wrap(impl, creationContext, isolate);
71 } 72 }
72 73
73 template<typename CallbackInfo> 74 template<typename CallbackInfo>
74 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestSpecialOperat ionsCustom* impl) 75 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface3* i mpl)
75 { 76 {
76 if (UNLIKELY(!impl)) { 77 if (UNLIKELY(!impl)) {
77 v8SetReturnValueNull(callbackInfo); 78 v8SetReturnValueNull(callbackInfo);
78 return; 79 return;
79 } 80 }
80 if (DOMDataStore::setReturnValueFromWrapper<V8TestSpecialOperationsCustom>(c allbackInfo.GetReturnValue(), impl)) 81 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterface3>(callbackInfo.G etReturnValue(), impl))
81 return; 82 return;
82 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 83 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
83 v8SetReturnValue(callbackInfo, wrapper); 84 v8SetReturnValue(callbackInfo, wrapper);
84 } 85 }
85 86
86 template<typename CallbackInfo> 87 template<typename CallbackInfo>
87 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestS pecialOperationsCustom* impl) 88 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterface3* impl)
88 { 89 {
89 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld()); 90 ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld());
90 if (UNLIKELY(!impl)) { 91 if (UNLIKELY(!impl)) {
91 v8SetReturnValueNull(callbackInfo); 92 v8SetReturnValueNull(callbackInfo);
92 return; 93 return;
93 } 94 }
94 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestSpecialOperati onsCustom>(callbackInfo.GetReturnValue(), impl)) 95 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterface3>(ca llbackInfo.GetReturnValue(), impl))
95 return; 96 return;
96 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()); 97 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate());
97 v8SetReturnValue(callbackInfo, wrapper); 98 v8SetReturnValue(callbackInfo, wrapper);
98 } 99 }
99 100
100 template<class CallbackInfo, class Wrappable> 101 template<class CallbackInfo, class Wrappable>
101 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestSpecialOp erationsCustom* impl, Wrappable* wrappable) 102 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface 3* impl, Wrappable* wrappable)
102 { 103 {
103 if (UNLIKELY(!impl)) { 104 if (UNLIKELY(!impl)) {
104 v8SetReturnValueNull(callbackInfo); 105 v8SetReturnValueNull(callbackInfo);
105 return; 106 return;
106 } 107 }
107 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestSpecialOperationsCusto m>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 108 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterface3>(callbackIn fo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
108 return; 109 return;
109 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 110 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
110 v8SetReturnValue(callbackInfo, wrapper); 111 v8SetReturnValue(callbackInfo, wrapper);
111 } 112 }
112 113
113 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestSpecialOperationsCustom> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 114 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterface3> impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
114 { 115 {
115 return toV8(impl.get(), creationContext, isolate); 116 return toV8(impl.get(), creationContext, isolate);
116 } 117 }
117 118
118 template<class CallbackInfo> 119 template<class CallbackInfo>
119 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestSp ecialOperationsCustom> impl) 120 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terface3> impl)
120 { 121 {
121 v8SetReturnValue(callbackInfo, impl.get()); 122 v8SetReturnValue(callbackInfo, impl.get());
122 } 123 }
123 124
124 template<class CallbackInfo> 125 template<class CallbackInfo>
125 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestSpecialOperationsCustom> impl) 126 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterface3> impl)
126 { 127 {
127 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 128 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
128 } 129 }
129 130
130 template<class CallbackInfo, class Wrappable> 131 template<class CallbackInfo, class Wrappable>
131 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stSpecialOperationsCustom> impl, Wrappable* wrappable) 132 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterface3> impl, Wrappable* wrappable)
132 { 133 {
133 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 134 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
134 } 135 }
135 136
136 } 137 }
137 #endif // V8TestSpecialOperationsCustom_h 138 #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