OLD | NEW |
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 #include "V8TestInterfacePartial.h" | 7 #include "V8TestInterfacePartial.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/PrivateScriptRunner.h" | 10 #include "bindings/core/v8/PrivateScriptRunner.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 { | 40 { |
41 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttribute
Getter(info); | 41 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttribute
Getter(info); |
42 } | 42 } |
43 | 43 |
44 static void partial4LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 44 static void partial4LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
45 { | 45 { |
46 v8::Local<v8::Object> holder = info.Holder(); | 46 v8::Local<v8::Object> holder = info.Holder(); |
47 ExceptionState exceptionState(ExceptionState::SetterContext, "partial4LongAt
tribute", "TestInterface", holder, info.GetIsolate()); | 47 ExceptionState exceptionState(ExceptionState::SetterContext, "partial4LongAt
tribute", "TestInterface", holder, info.GetIsolate()); |
48 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 48 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
49 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 49 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); |
50 if (exceptionState.throwIfNeeded()) | 50 if (exceptionState.hadException()) { |
51 return; | 51 return; |
| 52 } |
52 TestInterfacePartial4::setPartial4LongAttribute(*impl, cppValue); | 53 TestInterfacePartial4::setPartial4LongAttribute(*impl, cppValue); |
53 } | 54 } |
54 | 55 |
55 static void partial4LongAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 56 static void partial4LongAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
56 { | 57 { |
57 v8::Local<v8::Value> v8Value = info[0]; | 58 v8::Local<v8::Value> v8Value = info[0]; |
58 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttribute
Setter(v8Value, info); | 59 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttribute
Setter(v8Value, info); |
59 } | 60 } |
60 | 61 |
61 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 62 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
62 { | 63 { |
63 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 64 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
64 V8StringResource<> value; | 65 V8StringResource<> value; |
65 { | 66 { |
66 value = info[0]; | 67 value = info[0]; |
67 if (!value.prepare()) | 68 if (!value.prepare()) { |
68 return; | 69 return; |
| 70 } |
69 } | 71 } |
70 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value)
; | 72 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value)
; |
71 } | 73 } |
72 | 74 |
73 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 75 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
74 { | 76 { |
75 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 77 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
76 switch (std::min(1, info.Length())) { | 78 switch (std::min(1, info.Length())) { |
77 case 0: | 79 case 0: |
78 break; | 80 break; |
79 case 1: | 81 case 1: |
80 if (true) { | 82 if (true) { |
81 voidMethodPartialOverload3Method(info); | 83 voidMethodPartialOverload3Method(info); |
82 return; | 84 return; |
83 } | 85 } |
84 break; | 86 break; |
85 default: | 87 default: |
86 break; | 88 break; |
87 } | 89 } |
88 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 90 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
89 exceptionState.throwIfNeeded(); | |
90 return; | 91 return; |
91 } | 92 } |
92 | 93 |
93 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) | 94 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) |
94 { | 95 { |
95 V8StringResource<> value; | 96 V8StringResource<> value; |
96 { | 97 { |
97 value = info[0]; | 98 value = info[0]; |
98 if (!value.prepare()) | 99 if (!value.prepare()) { |
99 return; | 100 return; |
| 101 } |
100 } | 102 } |
101 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); | 103 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); |
102 } | 104 } |
103 | 105 |
104 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 106 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
105 { | 107 { |
106 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM
ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 108 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM
ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
107 switch (std::min(1, info.Length())) { | 109 switch (std::min(1, info.Length())) { |
108 case 0: | 110 case 0: |
109 break; | 111 break; |
110 case 1: | 112 case 1: |
111 if (true) { | 113 if (true) { |
112 staticVoidMethodPartialOverload2Method(info); | 114 staticVoidMethodPartialOverload2Method(info); |
113 return; | 115 return; |
114 } | 116 } |
115 break; | 117 break; |
116 default: | 118 default: |
117 break; | 119 break; |
118 } | 120 } |
119 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 121 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
120 exceptionState.throwIfNeeded(); | |
121 return; | 122 return; |
122 } | 123 } |
123 | 124 |
124 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 125 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) |
125 { | 126 { |
126 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 127 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
127 Document* document; | 128 Document* document; |
128 { | 129 { |
129 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 130 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
130 if (!document) { | 131 if (!document) { |
(...skipping 14 matching lines...) Expand all Loading... |
145 if (V8Document::hasInstance(info[0], info.GetIsolate())) { | 146 if (V8Document::hasInstance(info[0], info.GetIsolate())) { |
146 promiseMethodPartialOverload3Method(info); | 147 promiseMethodPartialOverload3Method(info); |
147 return; | 148 return; |
148 } | 149 } |
149 break; | 150 break; |
150 default: | 151 default: |
151 break; | 152 break; |
152 } | 153 } |
153 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 154 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
154 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); | 155 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); |
| 156 exceptionState.clearException(); |
155 return; | 157 return; |
156 } | 158 } |
157 | 159 |
158 static void staticPromiseMethodPartialOverload2MethodPromise(const v8::FunctionC
allbackInfo<v8::Value>& info, ExceptionState& exceptionState) | 160 static void staticPromiseMethodPartialOverload2MethodPromise(const v8::FunctionC
allbackInfo<v8::Value>& info, ExceptionState& exceptionState) |
159 { | 161 { |
160 V8StringResource<> value; | 162 V8StringResource<> value; |
161 { | 163 { |
162 value = info[0]; | 164 value = info[0]; |
163 if (!value.prepare(exceptionState)) | 165 if (!value.prepare(exceptionState)) { |
164 return; | 166 return; |
| 167 } |
165 } | 168 } |
166 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); | 169 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); |
167 } | 170 } |
168 | 171 |
169 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 172 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
170 { | 173 { |
171 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 174 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
172 staticPromiseMethodPartialOverload2MethodPromise(info, exceptionState); | 175 staticPromiseMethodPartialOverload2MethodPromise(info, exceptionState); |
173 if (exceptionState.hadException()) | 176 if (exceptionState.hadException()) |
174 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); | 177 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); |
175 } | 178 } |
176 | 179 |
177 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 180 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
178 { | 181 { |
179 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
180 switch (std::min(1, info.Length())) { | 183 switch (std::min(1, info.Length())) { |
181 case 0: | 184 case 0: |
182 break; | 185 break; |
183 case 1: | 186 case 1: |
184 if (true) { | 187 if (true) { |
185 staticPromiseMethodPartialOverload2Method(info); | 188 staticPromiseMethodPartialOverload2Method(info); |
186 return; | 189 return; |
187 } | 190 } |
188 break; | 191 break; |
189 default: | 192 default: |
190 break; | 193 break; |
191 } | 194 } |
192 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 195 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
193 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); | 196 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); |
| 197 exceptionState.clearException(); |
194 return; | 198 return; |
195 } | 199 } |
196 | 200 |
197 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 201 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
198 { | 202 { |
199 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 203 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
200 V8StringResource<> value; | 204 V8StringResource<> value; |
201 { | 205 { |
202 value = info[0]; | 206 value = info[0]; |
203 if (!value.prepare()) | 207 if (!value.prepare()) { |
204 return; | 208 return; |
| 209 } |
205 } | 210 } |
206 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); | 211 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); |
207 } | 212 } |
208 | 213 |
209 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 214 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
210 { | 215 { |
211 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 216 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
212 Node* node; | 217 Node* node; |
213 { | 218 { |
214 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 219 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
(...skipping 18 matching lines...) Expand all Loading... |
233 } | 238 } |
234 if (true) { | 239 if (true) { |
235 partial2VoidMethod2Method(info); | 240 partial2VoidMethod2Method(info); |
236 return; | 241 return; |
237 } | 242 } |
238 break; | 243 break; |
239 default: | 244 default: |
240 break; | 245 break; |
241 } | 246 } |
242 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 247 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
243 exceptionState.throwIfNeeded(); | |
244 return; | 248 return; |
245 } | 249 } |
246 | 250 |
247 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 251 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
248 { | 252 { |
249 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
TestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 253 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
TestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
250 if (UNLIKELY(info.Length() < 1)) { | 254 if (UNLIKELY(info.Length() < 1)) { |
251 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 255 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
252 exceptionState.throwIfNeeded(); | |
253 return; | 256 return; |
254 } | 257 } |
255 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 258 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
256 V8StringResource<> arg; | 259 V8StringResource<> arg; |
257 { | 260 { |
258 arg = info[0]; | 261 arg = info[0]; |
259 if (!arg.prepare()) | 262 if (!arg.prepare()) { |
260 return; | 263 return; |
| 264 } |
261 const char* validValues[] = { | 265 const char* validValues[] = { |
262 "EnumModulesValue1", | 266 "EnumModulesValue1", |
263 "EnumModulesValue2", | 267 "EnumModulesValue2", |
264 }; | 268 }; |
265 if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestE
numModules", exceptionState)) { | 269 if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestE
numModules", exceptionState)) { |
266 exceptionState.throwIfNeeded(); | |
267 return; | 270 return; |
268 } | 271 } |
269 } | 272 } |
270 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*im
pl, arg); | 273 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*im
pl, arg); |
271 } | 274 } |
272 | 275 |
273 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 276 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
274 { | 277 { |
275 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); | 278 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); |
276 } | 279 } |
277 | 280 |
278 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 281 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
279 { | 282 { |
280 V8StringResource<> value; | 283 V8StringResource<> value; |
281 { | 284 { |
282 value = info[0]; | 285 value = info[0]; |
283 if (!value.prepare()) | 286 if (!value.prepare()) { |
284 return; | 287 return; |
| 288 } |
285 } | 289 } |
286 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value); | 290 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value); |
287 } | 291 } |
288 | 292 |
289 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 293 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
290 { | 294 { |
291 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta
ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 295 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta
ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
292 switch (std::min(1, info.Length())) { | 296 switch (std::min(1, info.Length())) { |
293 case 0: | 297 case 0: |
294 break; | 298 break; |
295 case 1: | 299 case 1: |
296 if (true) { | 300 if (true) { |
297 partial2StaticVoidMethod2Method(info); | 301 partial2StaticVoidMethod2Method(info); |
298 return; | 302 return; |
299 } | 303 } |
300 break; | 304 break; |
301 default: | 305 default: |
302 break; | 306 break; |
303 } | 307 } |
304 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 308 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
305 exceptionState.throwIfNeeded(); | |
306 return; | 309 return; |
307 } | 310 } |
308 | 311 |
309 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 312 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
310 { | 313 { |
311 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 314 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
312 TestInterfacePartial3Implementation::unscopeableVoidMethod(*impl); | 315 TestInterfacePartial3Implementation::unscopeableVoidMethod(*impl); |
313 } | 316 } |
314 | 317 |
315 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 318 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 &V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 399 &V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
397 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 400 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
398 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 401 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
399 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 402 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
400 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 403 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
401 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 404 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
402 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 405 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
403 } | 406 } |
404 | 407 |
405 } // namespace blink | 408 } // namespace blink |
OLD | NEW |