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 "config.h" | 7 #include "config.h" |
8 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
9 #include "V8TestInterfacePartial.h" | 9 #include "V8TestInterfacePartial.h" |
10 | 10 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 default: | 216 default: |
217 break; | 217 break; |
218 } | 218 } |
219 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 219 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
220 exceptionState.throwIfNeeded(); | 220 exceptionState.throwIfNeeded(); |
221 return; | 221 return; |
222 } | 222 } |
223 | 223 |
224 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 224 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
225 { | 225 { |
| 226 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
TestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
226 if (UNLIKELY(info.Length() < 1)) { | 227 if (UNLIKELY(info.Length() < 1)) { |
227 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "partialVoidTestEnumModulesArgMethod", "TestInterface", 1, info
.Length()), info.GetIsolate()); | 228 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 229 exceptionState.throwIfNeeded(); |
228 return; | 230 return; |
229 } | 231 } |
230 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 232 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
231 V8StringResource<> arg; | 233 V8StringResource<> arg; |
232 { | 234 { |
233 arg = info[0]; | 235 arg = info[0]; |
234 if (!arg.prepare()) | 236 if (!arg.prepare()) |
235 return; | 237 return; |
236 String string = arg; | 238 static const char* validValues[] = { |
237 if (!(string == "EnumModulesValue1" || string == "EnumModulesValue2")) { | 239 "EnumModulesValue1", |
238 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("partialVoidTestEnumModulesArgMethod", "TestInterface", "para
meter 1 ('" + string + "') is not a valid enum value.")); | 240 "EnumModulesValue2", |
| 241 }; |
| 242 if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), except
ionState)) { |
| 243 exceptionState.throwIfNeeded(); |
239 return; | 244 return; |
240 } | 245 } |
241 } | 246 } |
242 TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*im
pl, arg); | 247 TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*im
pl, arg); |
243 } | 248 } |
244 | 249 |
245 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 250 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
246 { | 251 { |
247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 252 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
248 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); | 253 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 362 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
358 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 363 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
359 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 364 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
360 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 365 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
361 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 366 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
362 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 367 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
363 } | 368 } |
364 | 369 |
365 } // namespace blink | 370 } // namespace blink |
366 #endif // ENABLE(CONDITION) | 371 #endif // ENABLE(CONDITION) |
OLD | NEW |