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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 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."); |
91 exceptionState.throwIfNeeded(); | 91 exceptionState.throwIfNeeded(); |
92 } | 92 } |
93 | 93 |
94 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 94 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) |
95 { | 95 { |
96 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 96 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
97 Document* document; | 97 Document* document; |
98 { | 98 { |
99 if (info.Length() > 0 && !V8Document::hasInstance(info[0], info.GetIsola
te())) { | 99 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 100 if (!document) { |
100 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V
8ThrowException::createTypeError(info.GetIsolate(), ExceptionMessages::failedToE
xecute("promiseMethodPartialOverload", "TestInterface", "parameter 1 is not of t
ype 'Document'.")))); | 101 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V
8ThrowException::createTypeError(info.GetIsolate(), ExceptionMessages::failedToE
xecute("promiseMethodPartialOverload", "TestInterface", "parameter 1 is not of t
ype 'Document'.")))); |
101 return; | 102 return; |
102 } | 103 } |
103 document = V8Document::toImpl(v8::Handle<v8::Object>::Cast(info[0])); | |
104 } | 104 } |
105 v8SetReturnValue(info, TestPartialInterfaceImplementation3::promiseMethodPar
tialOverload(*impl, document).v8Value()); | 105 v8SetReturnValue(info, TestPartialInterfaceImplementation3::promiseMethodPar
tialOverload(*impl, document).v8Value()); |
106 } | 106 } |
107 | 107 |
108 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 108 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
109 { | 109 { |
110 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
odPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 110 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
odPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
111 switch (std::min(1, info.Length())) { | 111 switch (std::min(1, info.Length())) { |
112 case 0: | 112 case 0: |
113 break; | 113 break; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 TOSTRING_VOID_INTERNAL(value, info[0]); | 161 TOSTRING_VOID_INTERNAL(value, info[0]); |
162 } | 162 } |
163 TestPartialInterfaceImplementation3::partial2VoidMethod(*impl, value); | 163 TestPartialInterfaceImplementation3::partial2VoidMethod(*impl, value); |
164 } | 164 } |
165 | 165 |
166 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 166 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
167 { | 167 { |
168 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 168 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
169 Node* node; | 169 Node* node; |
170 { | 170 { |
171 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate()
)) { | 171 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 172 if (!node) { |
172 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("partial2VoidMethod", "TestInterface", "parameter 1 is not of
type 'Node'.")); | 173 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("partial2VoidMethod", "TestInterface", "parameter 1 is not of
type 'Node'.")); |
173 return; | 174 return; |
174 } | 175 } |
175 node = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0])); | |
176 } | 176 } |
177 TestPartialInterfaceImplementation3::partial2VoidMethod(*impl, node); | 177 TestPartialInterfaceImplementation3::partial2VoidMethod(*impl, node); |
178 } | 178 } |
179 | 179 |
180 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 180 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
181 { | 181 { |
182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi
dMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi
dMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
183 switch (std::min(1, info.Length())) { | 183 switch (std::min(1, info.Length())) { |
184 case 0: | 184 case 0: |
185 break; | 185 break; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 296 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
297 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 297 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
298 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 298 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
299 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 299 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
300 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 300 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
301 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 301 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
302 } | 302 } |
303 | 303 |
304 } // namespace blink | 304 } // namespace blink |
305 #endif // ENABLE(CONDITION) | 305 #endif // ENABLE(CONDITION) |
OLD | NEW |