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

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

Issue 140693016: IDL compiler: interface and integer types for special operations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Typo Created 6 years, 10 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
32 32
33 #ifndef V8TestInterfaceConstructor_h 33 #ifndef V8TestSpecialOperationsInt_h
34 #define V8TestInterfaceConstructor_h 34 #define V8TestSpecialOperationsInt_h
35 35
36 #include "bindings/tests/idls/TestInterfaceConstructor.h" 36 #include "bindings/tests/idls/TestSpecialOperationsInt.h"
37 #include "bindings/v8/V8Binding.h" 37 #include "bindings/v8/V8Binding.h"
38 #include "bindings/v8/V8DOMWrapper.h" 38 #include "bindings/v8/V8DOMWrapper.h"
39 #include "bindings/v8/WrapperTypeInfo.h" 39 #include "bindings/v8/WrapperTypeInfo.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class V8TestInterfaceConstructor { 43 class V8TestSpecialOperationsInt {
44 public: 44 public:
45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); 45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
46 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType); 46 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType);
47 static TestInterfaceConstructor* toNative(v8::Handle<v8::Object> object) 47 static TestSpecialOperationsInt* toNative(v8::Handle<v8::Object> object)
48 { 48 {
49 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 49 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
50 } 50 }
51 static void derefObject(void*); 51 static void derefObject(void*);
52 static const WrapperTypeInfo wrapperTypeInfo; 52 static const WrapperTypeInfo wrapperTypeInfo;
53 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
54 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 53 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
55 static inline void* toInternalPointer(TestInterfaceConstructor* impl) 54 static inline void* toInternalPointer(TestSpecialOperationsInt* impl)
56 { 55 {
57 return impl; 56 return impl;
58 } 57 }
59 58
60 static inline TestInterfaceConstructor* fromInternalPointer(void* object) 59 static inline TestSpecialOperationsInt* fromInternalPointer(void* object)
61 { 60 {
62 return static_cast<TestInterfaceConstructor*>(object); 61 return static_cast<TestSpecialOperationsInt*>(object);
63 } 62 }
64 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceConstructor*, v8::Isolate*) { } 63 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestS pecialOperationsInt*, v8::Isolate*) { }
65 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 64 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
66 65
67 private: 66 private:
68 friend v8::Handle<v8::Object> wrap(TestInterfaceConstructor*, v8::Handle<v8: :Object> creationContext, v8::Isolate*); 67 friend v8::Handle<v8::Object> wrap(TestSpecialOperationsInt*, v8::Handle<v8: :Object> creationContext, v8::Isolate*);
69 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceConstruc tor>, v8::Handle<v8::Object> creationContext, v8::Isolate*); 68 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestSpecialOperations Int>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
70 }; 69 };
71 70
72 template<> 71 template<>
73 class WrapperTypeTraits<TestInterfaceConstructor > { 72 class WrapperTypeTraits<TestSpecialOperationsInt > {
74 public: 73 public:
75 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfaceCon structor::wrapperTypeInfo; } 74 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestSpecialOpera tionsInt::wrapperTypeInfo; }
76 }; 75 };
77 76
78 inline v8::Handle<v8::Object> wrap(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 77 inline v8::Handle<v8::Object> wrap(TestSpecialOperationsInt* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
79 { 78 {
80 ASSERT(impl); 79 ASSERT(impl);
81 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl, isol ate)); 80 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperationsInt>(impl, isol ate));
82 return V8TestInterfaceConstructor::createWrapper(impl, creationContext, isol ate); 81 return V8TestSpecialOperationsInt::createWrapper(impl, creationContext, isol ate);
83 } 82 }
84 83
85 inline v8::Handle<v8::Value> toV8(TestInterfaceConstructor* impl, v8::Handle<v8: :Object> creationContext, v8::Isolate* isolate) 84 inline v8::Handle<v8::Value> toV8(TestSpecialOperationsInt* impl, v8::Handle<v8: :Object> creationContext, v8::Isolate* isolate)
86 { 85 {
87 if (UNLIKELY(!impl)) 86 if (UNLIKELY(!impl))
88 return v8::Null(isolate); 87 return v8::Null(isolate);
89 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceCons tructor>(impl, isolate); 88 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestSpecialOperat ionsInt>(impl, isolate);
90 if (!wrapper.IsEmpty()) 89 if (!wrapper.IsEmpty())
91 return wrapper; 90 return wrapper;
92 return wrap(impl, creationContext, isolate); 91 return wrap(impl, creationContext, isolate);
93 } 92 }
94 93
95 template<typename CallbackInfo> 94 template<typename CallbackInfo>
96 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceCons tructor* impl) 95 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestSpecialOperat ionsInt* impl)
97 { 96 {
98 if (UNLIKELY(!impl)) { 97 if (UNLIKELY(!impl)) {
99 v8SetReturnValueNull(callbackInfo); 98 v8SetReturnValueNull(callbackInfo);
100 return; 99 return;
101 } 100 }
102 if (DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceConstructor>(call backInfo.GetReturnValue(), impl)) 101 if (DOMDataStore::setReturnValueFromWrapper<V8TestSpecialOperationsInt>(call backInfo.GetReturnValue(), impl))
103 return; 102 return;
104 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 103 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
105 v8SetReturnValue(callbackInfo, wrapper); 104 v8SetReturnValue(callbackInfo, wrapper);
106 } 105 }
107 106
108 template<typename CallbackInfo> 107 template<typename CallbackInfo>
109 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestI nterfaceConstructor* impl) 108 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestS pecialOperationsInt* impl)
110 { 109 {
111 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld); 110 ASSERT(worldType(callbackInfo.GetIsolate()) == MainWorld);
112 if (UNLIKELY(!impl)) { 111 if (UNLIKELY(!impl)) {
113 v8SetReturnValueNull(callbackInfo); 112 v8SetReturnValueNull(callbackInfo);
114 return; 113 return;
115 } 114 }
116 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceConst ructor>(callbackInfo.GetReturnValue(), impl)) 115 if (DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestSpecialOperati onsInt>(callbackInfo.GetReturnValue(), impl))
117 return; 116 return;
118 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()); 117 v8::Handle<v8::Value> wrapper = wrap(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate());
119 v8SetReturnValue(callbackInfo, wrapper); 118 v8SetReturnValue(callbackInfo, wrapper);
120 } 119 }
121 120
122 template<class CallbackInfo, class Wrappable> 121 template<class CallbackInfo, class Wrappable>
123 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface Constructor* impl, Wrappable* wrappable) 122 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestSpecialOp erationsInt* impl, Wrappable* wrappable)
124 { 123 {
125 if (UNLIKELY(!impl)) { 124 if (UNLIKELY(!impl)) {
126 v8SetReturnValueNull(callbackInfo); 125 v8SetReturnValueNull(callbackInfo);
127 return; 126 return;
128 } 127 }
129 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceConstructor>( callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 128 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestSpecialOperationsInt>( callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
130 return; 129 return;
131 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 130 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
132 v8SetReturnValue(callbackInfo, wrapper); 131 v8SetReturnValue(callbackInfo, wrapper);
133 } 132 }
134 133
135 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceConstructor > impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate) 134 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestSpecialOperationsInt > impl, v8 ::Handle<v8::Object> creationContext, v8::Isolate* isolate)
136 { 135 {
137 return toV8(impl.get(), creationContext, isolate); 136 return toV8(impl.get(), creationContext, isolate);
138 } 137 }
139 138
140 template<class CallbackInfo> 139 template<class CallbackInfo>
141 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfaceConstructor > impl) 140 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestSp ecialOperationsInt > impl)
142 { 141 {
143 v8SetReturnValue(callbackInfo, impl.get()); 142 v8SetReturnValue(callbackInfo, impl.get());
144 } 143 }
145 144
146 template<class CallbackInfo> 145 template<class CallbackInfo>
147 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfaceConstructor > impl) 146 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestSpecialOperationsInt > impl)
148 { 147 {
149 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 148 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
150 } 149 }
151 150
152 template<class CallbackInfo, class Wrappable> 151 template<class CallbackInfo, class Wrappable>
153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfaceConstructor > impl, Wrappable* wrappable) 152 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stSpecialOperationsInt > impl, Wrappable* wrappable)
154 { 153 {
155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 154 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
156 } 155 }
157 156
158 } 157 }
159 #endif // V8TestInterfaceConstructor_h 158 #endif // V8TestSpecialOperationsInt_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698