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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp

Issue 2452403002: [Bindings] Reformat template files (4/4) (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
OLDNEW
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 // clang-format off 7 // clang-format off
8 #include "V8TestInterfacePartial.h" 8 #include "V8TestInterfacePartial.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 static void partial4LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) { 46 static void partial4LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) {
47 v8::Local<v8::Object> holder = info.Holder(); 47 v8::Local<v8::Object> holder = info.Holder();
48 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 48 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
49 49
50 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext , "TestInterface", "partial4LongAttribute"); 50 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext , "TestInterface", "partial4LongAttribute");
51 51
52 // Prepare the value to be set. 52 // Prepare the value to be set.
53 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception State); 53 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception State);
54 if (exceptionState.hadException()) 54 if (exceptionState.hadException())
55 return; 55 return;
56 56
57 TestInterfacePartial4::setPartial4LongAttribute(*impl, cppValue); 57 TestInterfacePartial4::setPartial4LongAttribute(*impl, cppValue);
58 } 58 }
59 59
60 void partial4LongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) { 60 void partial4LongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) {
61 v8::Local<v8::Value> v8Value = info[0]; 61 v8::Local<v8::Value> v8Value = info[0];
62 62
63 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSe tter(v8Value, info); 63 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSe tter(v8Value, info);
64 } 64 }
65 65
66 static void partial4StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) { 66 static void partial4StaticLongAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) {
67 v8SetReturnValueInt(info, TestInterfacePartial4::partial4StaticLongAttribute() ); 67 v8SetReturnValueInt(info, TestInterfacePartial4::partial4StaticLongAttribute() );
68 } 68 }
69 69
70 void partial4StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) { 70 void partial4StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) {
71 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttri buteGetter(info); 71 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttri buteGetter(info);
72 } 72 }
73 73
74 static void partial4StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) { 74 static void partial4StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) {
75 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext , "TestInterface", "partial4StaticLongAttribute"); 75 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext , "TestInterface", "partial4StaticLongAttribute");
76 76
77 // Prepare the value to be set. 77 // Prepare the value to be set.
78 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception State); 78 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception State);
79 if (exceptionState.hadException()) 79 if (exceptionState.hadException())
80 return; 80 return;
81 81
82 TestInterfacePartial4::setPartial4StaticLongAttribute(cppValue); 82 TestInterfacePartial4::setPartial4StaticLongAttribute(cppValue);
83 } 83 }
84 84
85 void partial4StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) { 85 void partial4StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) {
86 v8::Local<v8::Value> v8Value = info[0]; 86 v8::Local<v8::Value> v8Value = info[0];
87 87
88 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttri buteSetter(v8Value, info); 88 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttri buteSetter(v8Value, info);
89 } 89 }
90 90
91 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8:: Value>& info) { 91 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8:: Value>& info) {
92 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 92 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
93 93
94 V8StringResource<> value; 94 V8StringResource<> value;
95 value = info[0]; 95 value = info[0];
96 if (!value.prepare()) 96 if (!value.prepare())
97 return; 97 return;
98 98
99 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value); 99 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value);
100 } 100 }
101 101
102 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) { 102 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) {
103 bool isArityError = false; 103 bool isArityError = false;
104 switch (std::min(1, info.Length())) { 104 switch (std::min(1, info.Length())) {
105 case 0: 105 case 0:
106 break; 106 break;
107 case 1: 107 case 1:
(...skipping 10 matching lines...) Expand all
118 118
119 if (isArityError) { 119 if (isArityError) {
120 } 120 }
121 exceptionState.throwTypeError("No function was found that matched the signatur e provided."); 121 exceptionState.throwTypeError("No function was found that matched the signatur e provided.");
122 } 122 }
123 123
124 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf o<v8::Value>& info) { 124 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf o<v8::Value>& info) {
125 V8StringResource<> value; 125 V8StringResource<> value;
126 value = info[0]; 126 value = info[0];
127 if (!value.prepare()) 127 if (!value.prepare())
128 return; 128 return;
129 129
130 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); 130 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value);
131 } 131 }
132 132
133 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo <v8::Value>& info) { 133 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo <v8::Value>& info) {
134 bool isArityError = false; 134 bool isArityError = false;
135 switch (std::min(1, info.Length())) { 135 switch (std::min(1, info.Length())) {
136 case 0: 136 case 0:
137 break; 137 break;
138 case 1: 138 case 1:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 exceptionState.throwTypeError("No function was found that matched the signatur e provided."); 192 exceptionState.throwTypeError("No function was found that matched the signatur e provided.");
193 } 193 }
194 194
195 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback Info<v8::Value>& info) { 195 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback Info<v8::Value>& info) {
196 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont ext, "TestInterface", "staticPromiseMethodPartialOverload"); 196 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont ext, "TestInterface", "staticPromiseMethodPartialOverload");
197 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); 197 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState);
198 198
199 V8StringResource<> value; 199 V8StringResource<> value;
200 value = info[0]; 200 value = info[0];
201 if (!value.prepare(exceptionState)) 201 if (!value.prepare(exceptionState))
202 return; 202 return;
203 203
204 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMetho dPartialOverload(value).v8Value()); 204 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMetho dPartialOverload(value).v8Value());
205 } 205 }
206 206
207 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) { 207 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) {
208 bool isArityError = false; 208 bool isArityError = false;
209 switch (std::min(1, info.Length())) { 209 switch (std::min(1, info.Length())) {
210 case 0: 210 case 0:
211 break; 211 break;
212 case 1: 212 case 1:
(...skipping 13 matching lines...) Expand all
226 } 226 }
227 exceptionState.throwTypeError("No function was found that matched the signatur e provided."); 227 exceptionState.throwTypeError("No function was found that matched the signatur e provided.");
228 } 228 }
229 229
230 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) { 230 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
231 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 231 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
232 232
233 V8StringResource<> value; 233 V8StringResource<> value;
234 value = info[0]; 234 value = info[0];
235 if (!value.prepare()) 235 if (!value.prepare())
236 return; 236 return;
237 237
238 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); 238 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value);
239 } 239 }
240 240
241 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info) { 241 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info) {
242 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 242 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
243 243
244 Node* node; 244 Node* node;
245 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); 245 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]);
246 if (!node) { 246 if (!node) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 284 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
285 285
286 if (UNLIKELY(info.Length() < 1)) { 286 if (UNLIKELY(info.Length() < 1)) {
287 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info. Length())); 287 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info. Length()));
288 return; 288 return;
289 } 289 }
290 290
291 V8StringResource<> arg; 291 V8StringResource<> arg;
292 arg = info[0]; 292 arg = info[0];
293 if (!arg.prepare()) 293 if (!arg.prepare())
294 return; 294 return;
295 const char* validArgValues[] = { 295 const char* validArgValues[] = {
296 "EnumModulesValue1", 296 "EnumModulesValue1",
297 "EnumModulesValue2", 297 "EnumModulesValue2",
298 }; 298 };
299 if (!isValidEnum(arg, validArgValues, WTF_ARRAY_LENGTH(validArgValues), "TestE numModules", exceptionState)) { 299 if (!isValidEnum(arg, validArgValues, WTF_ARRAY_LENGTH(validArgValues), "TestE numModules", exceptionState)) {
300 return; 300 return;
301 } 301 }
302 302
303 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*impl , arg); 303 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*impl , arg);
304 } 304 }
305 305
306 void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) { 306 void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) {
307 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgMet hodMethod(info); 307 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgMet hodMethod(info);
308 } 308 }
309 309
310 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info) { 310 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info) {
311 V8StringResource<> value; 311 V8StringResource<> value;
312 value = info[0]; 312 value = info[0];
313 if (!value.prepare()) 313 if (!value.prepare())
314 return; 314 return;
315 315
316 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value); 316 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value);
317 } 317 }
318 318
319 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) { 319 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) {
320 bool isArityError = false; 320 bool isArityError = false;
321 switch (std::min(1, info.Length())) { 321 switch (std::min(1, info.Length())) {
322 case 0: 322 case 0:
323 break; 323 break;
324 case 1: 324 case 1:
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); 440 V8TestInterfacePartial::preparePrototypeAndInterfaceObject);
441 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); 441 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod);
442 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo adMethod); 442 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo adMethod);
443 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface (&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth od); 443 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface (&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth od);
444 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial OverloadMethod); 444 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial OverloadMethod);
445 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte rfaceImplementationPartialV8Internal::partial2VoidMethodMethod); 445 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte rfaceImplementationPartialV8Internal::partial2VoidMethodMethod);
446 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); 446 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod);
447 } 447 }
448 448
449 } // namespace blink 449 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698