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 14 matching lines...) Expand all Loading... |
25 namespace blink { | 25 namespace blink { |
26 | 26 |
27 namespace TestInterfaceImplementationPartialV8Internal { | 27 namespace TestInterfaceImplementationPartialV8Internal { |
28 | 28 |
29 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 29 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
30 { | 30 { |
31 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 31 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
32 V8StringResource<> value; | 32 V8StringResource<> value; |
33 { | 33 { |
34 value = info[0]; | 34 value = info[0]; |
35 if (!value.prepare()) | 35 if (!value.prepare()) { |
36 return; | 36 return; |
| 37 } |
37 } | 38 } |
38 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value)
; | 39 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value)
; |
39 } | 40 } |
40 | 41 |
41 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 42 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
42 { | 43 { |
43 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 44 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
44 switch (std::min(1, info.Length())) { | 45 switch (std::min(1, info.Length())) { |
45 case 0: | 46 case 0: |
46 break; | 47 break; |
47 case 1: | 48 case 1: |
48 if (true) { | 49 if (true) { |
49 voidMethodPartialOverload3Method(info); | 50 voidMethodPartialOverload3Method(info); |
50 return; | 51 return; |
51 } | 52 } |
52 break; | 53 break; |
53 default: | 54 default: |
54 break; | 55 break; |
55 } | 56 } |
56 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 57 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
57 exceptionState.throwIfNeeded(); | |
58 return; | 58 return; |
59 } | 59 } |
60 | 60 |
61 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) | 61 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) |
62 { | 62 { |
63 V8StringResource<> value; | 63 V8StringResource<> value; |
64 { | 64 { |
65 value = info[0]; | 65 value = info[0]; |
66 if (!value.prepare()) | 66 if (!value.prepare()) { |
67 return; | 67 return; |
| 68 } |
68 } | 69 } |
69 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); | 70 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); |
70 } | 71 } |
71 | 72 |
72 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 73 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
73 { | 74 { |
74 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM
ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 75 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM
ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
75 switch (std::min(1, info.Length())) { | 76 switch (std::min(1, info.Length())) { |
76 case 0: | 77 case 0: |
77 break; | 78 break; |
78 case 1: | 79 case 1: |
79 if (true) { | 80 if (true) { |
80 staticVoidMethodPartialOverload2Method(info); | 81 staticVoidMethodPartialOverload2Method(info); |
81 return; | 82 return; |
82 } | 83 } |
83 break; | 84 break; |
84 default: | 85 default: |
85 break; | 86 break; |
86 } | 87 } |
87 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 88 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
88 exceptionState.throwIfNeeded(); | |
89 return; | 89 return; |
90 } | 90 } |
91 | 91 |
92 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 92 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) |
93 { | 93 { |
94 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 94 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
95 Document* document; | 95 Document* document; |
96 { | 96 { |
97 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 97 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
98 if (!document) { | 98 if (!document) { |
(...skipping 14 matching lines...) Expand all Loading... |
113 if (V8Document::hasInstance(info[0], info.GetIsolate())) { | 113 if (V8Document::hasInstance(info[0], info.GetIsolate())) { |
114 promiseMethodPartialOverload3Method(info); | 114 promiseMethodPartialOverload3Method(info); |
115 return; | 115 return; |
116 } | 116 } |
117 break; | 117 break; |
118 default: | 118 default: |
119 break; | 119 break; |
120 } | 120 } |
121 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."); |
122 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); | 122 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); |
| 123 exceptionState.clearException(); |
123 return; | 124 return; |
124 } | 125 } |
125 | 126 |
126 static void staticPromiseMethodPartialOverload2MethodPromise(const v8::FunctionC
allbackInfo<v8::Value>& info, ExceptionState& exceptionState) | 127 static void staticPromiseMethodPartialOverload2MethodPromise(const v8::FunctionC
allbackInfo<v8::Value>& info, ExceptionState& exceptionState) |
127 { | 128 { |
128 V8StringResource<> value; | 129 V8StringResource<> value; |
129 { | 130 { |
130 value = info[0]; | 131 value = info[0]; |
131 if (!value.prepare(exceptionState)) | 132 if (!value.prepare(exceptionState)) { |
132 return; | 133 return; |
| 134 } |
133 } | 135 } |
134 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); | 136 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); |
135 } | 137 } |
136 | 138 |
137 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 139 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
138 { | 140 { |
139 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 141 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
140 staticPromiseMethodPartialOverload2MethodPromise(info, exceptionState); | 142 staticPromiseMethodPartialOverload2MethodPromise(info, exceptionState); |
141 if (exceptionState.hadException()) | 143 if (exceptionState.hadException()) |
142 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); | 144 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); |
143 } | 145 } |
144 | 146 |
145 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 147 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
146 { | 148 { |
147 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 149 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
148 switch (std::min(1, info.Length())) { | 150 switch (std::min(1, info.Length())) { |
149 case 0: | 151 case 0: |
150 break; | 152 break; |
151 case 1: | 153 case 1: |
152 if (true) { | 154 if (true) { |
153 staticPromiseMethodPartialOverload2Method(info); | 155 staticPromiseMethodPartialOverload2Method(info); |
154 return; | 156 return; |
155 } | 157 } |
156 break; | 158 break; |
157 default: | 159 default: |
158 break; | 160 break; |
159 } | 161 } |
160 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 162 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
161 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); | 163 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); |
| 164 exceptionState.clearException(); |
162 return; | 165 return; |
163 } | 166 } |
164 | 167 |
165 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 168 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
166 { | 169 { |
167 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 170 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
168 V8StringResource<> value; | 171 V8StringResource<> value; |
169 { | 172 { |
170 value = info[0]; | 173 value = info[0]; |
171 if (!value.prepare()) | 174 if (!value.prepare()) { |
172 return; | 175 return; |
| 176 } |
173 } | 177 } |
174 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); | 178 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); |
175 } | 179 } |
176 | 180 |
177 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 181 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
178 { | 182 { |
179 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 183 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
180 Node* node; | 184 Node* node; |
181 { | 185 { |
182 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 186 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
(...skipping 18 matching lines...) Expand all Loading... |
201 } | 205 } |
202 if (true) { | 206 if (true) { |
203 partial2VoidMethod2Method(info); | 207 partial2VoidMethod2Method(info); |
204 return; | 208 return; |
205 } | 209 } |
206 break; | 210 break; |
207 default: | 211 default: |
208 break; | 212 break; |
209 } | 213 } |
210 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 214 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
211 exceptionState.throwIfNeeded(); | |
212 return; | 215 return; |
213 } | 216 } |
214 | 217 |
215 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 218 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
216 { | 219 { |
217 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
TestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 220 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
TestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
218 if (UNLIKELY(info.Length() < 1)) { | 221 if (UNLIKELY(info.Length() < 1)) { |
219 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 222 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
220 exceptionState.throwIfNeeded(); | |
221 return; | 223 return; |
222 } | 224 } |
223 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 225 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
224 V8StringResource<> arg; | 226 V8StringResource<> arg; |
225 { | 227 { |
226 arg = info[0]; | 228 arg = info[0]; |
227 if (!arg.prepare()) | 229 if (!arg.prepare()) { |
228 return; | 230 return; |
| 231 } |
229 const char* validValues[] = { | 232 const char* validValues[] = { |
230 "EnumModulesValue1", | 233 "EnumModulesValue1", |
231 "EnumModulesValue2", | 234 "EnumModulesValue2", |
232 }; | 235 }; |
233 if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestE
numModules", exceptionState)) { | 236 if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestE
numModules", exceptionState)) { |
234 exceptionState.throwIfNeeded(); | |
235 return; | 237 return; |
236 } | 238 } |
237 } | 239 } |
238 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*im
pl, arg); | 240 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*im
pl, arg); |
239 } | 241 } |
240 | 242 |
241 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 243 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
242 { | 244 { |
243 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); | 245 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); |
244 } | 246 } |
245 | 247 |
246 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 248 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
247 { | 249 { |
248 V8StringResource<> value; | 250 V8StringResource<> value; |
249 { | 251 { |
250 value = info[0]; | 252 value = info[0]; |
251 if (!value.prepare()) | 253 if (!value.prepare()) { |
252 return; | 254 return; |
| 255 } |
253 } | 256 } |
254 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value); | 257 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value); |
255 } | 258 } |
256 | 259 |
257 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 260 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
258 { | 261 { |
259 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta
ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 262 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta
ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
260 switch (std::min(1, info.Length())) { | 263 switch (std::min(1, info.Length())) { |
261 case 0: | 264 case 0: |
262 break; | 265 break; |
263 case 1: | 266 case 1: |
264 if (true) { | 267 if (true) { |
265 partial2StaticVoidMethod2Method(info); | 268 partial2StaticVoidMethod2Method(info); |
266 return; | 269 return; |
267 } | 270 } |
268 break; | 271 break; |
269 default: | 272 default: |
270 break; | 273 break; |
271 } | 274 } |
272 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 275 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
273 exceptionState.throwIfNeeded(); | |
274 return; | 276 return; |
275 } | 277 } |
276 | 278 |
277 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 279 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
278 { | 280 { |
279 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 281 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
280 TestInterfacePartial3Implementation::unscopeableVoidMethod(*impl); | 282 TestInterfacePartial3Implementation::unscopeableVoidMethod(*impl); |
281 } | 283 } |
282 | 284 |
283 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 285 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 &V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 336 &V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
335 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 337 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
336 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 338 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
337 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 339 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
338 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 340 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
339 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 341 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
340 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 342 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
341 } | 343 } |
342 | 344 |
343 } // namespace blink | 345 } // namespace blink |
OLD | NEW |