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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp

Issue 2891063003: bindings: Use an alias for @@iterator in certain declarations. (Closed)
Patch Set: Rebase patch Created 3 years, 7 months 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. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 ScriptState* scriptState = ScriptState::ForReceiverObject(info); 124 ScriptState* scriptState = ScriptState::ForReceiverObject(info);
125 125
126 Iterator* result = impl->keysForBinding(scriptState, exceptionState); 126 Iterator* result = impl->keysForBinding(scriptState, exceptionState);
127 if (exceptionState.HadException()) { 127 if (exceptionState.HadException()) {
128 return; 128 return;
129 } 129 }
130 V8SetReturnValue(info, result); 130 V8SetReturnValue(info, result);
131 } 131 }
132 132
133 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
134 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon text, "TestInterfaceGarbageCollected", "values");
135
136 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl( info.Holder());
137
138 ScriptState* scriptState = ScriptState::ForReceiverObject(info);
139
140 Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
141 if (exceptionState.HadException()) {
142 return;
143 }
144 V8SetReturnValue(info, result);
145 }
146
147 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { 133 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
148 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon text, "TestInterfaceGarbageCollected", "entries"); 134 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon text, "TestInterfaceGarbageCollected", "entries");
149 135
150 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl( info.Holder()); 136 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImpl( info.Holder());
151 137
152 ScriptState* scriptState = ScriptState::ForReceiverObject(info); 138 ScriptState* scriptState = ScriptState::ForReceiverObject(info);
153 139
154 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); 140 Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
155 if (exceptionState.HadException()) { 141 if (exceptionState.HadException()) {
156 return; 142 return;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 306 }
321 307
322 void V8TestInterfaceGarbageCollected::funcMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) { 308 void V8TestInterfaceGarbageCollected::funcMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) {
323 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); 309 TestInterfaceGarbageCollectedV8Internal::funcMethod(info);
324 } 310 }
325 311
326 void V8TestInterfaceGarbageCollected::keysMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) { 312 void V8TestInterfaceGarbageCollected::keysMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) {
327 TestInterfaceGarbageCollectedV8Internal::keysMethod(info); 313 TestInterfaceGarbageCollectedV8Internal::keysMethod(info);
328 } 314 }
329 315
330 void V8TestInterfaceGarbageCollected::valuesMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) {
331 TestInterfaceGarbageCollectedV8Internal::valuesMethod(info);
332 }
333
334 void V8TestInterfaceGarbageCollected::entriesMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) { 316 void V8TestInterfaceGarbageCollected::entriesMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) {
335 TestInterfaceGarbageCollectedV8Internal::entriesMethod(info); 317 TestInterfaceGarbageCollectedV8Internal::entriesMethod(info);
336 } 318 }
337 319
338 void V8TestInterfaceGarbageCollected::forEachMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) { 320 void V8TestInterfaceGarbageCollected::forEachMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) {
339 TestInterfaceGarbageCollectedV8Internal::forEachMethod(info); 321 TestInterfaceGarbageCollectedV8Internal::forEachMethod(info);
340 } 322 }
341 323
342 void V8TestInterfaceGarbageCollected::hasMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) { 324 void V8TestInterfaceGarbageCollected::hasMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) {
343 TestInterfaceGarbageCollectedV8Internal::hasMethod(info); 325 TestInterfaceGarbageCollectedV8Internal::hasMethod(info);
(...skipping 19 matching lines...) Expand all
363 { "attr1", V8TestInterfaceGarbageCollected::attr1AttributeGetterCallback, V8TestInterfaceGarbageCollected::attr1AttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds } 345 { "attr1", V8TestInterfaceGarbageCollected::attr1AttributeGetterCallback, V8TestInterfaceGarbageCollected::attr1AttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }
364 , 346 ,
365 347
366 { "size", V8TestInterfaceGarbageCollected::sizeAttributeGetterCallback, nu llptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::R eadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8 DOMConfiguration::kAllWorlds } 348 { "size", V8TestInterfaceGarbageCollected::sizeAttributeGetterCallback, nu llptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::DontEnum | v8::R eadOnly), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8 DOMConfiguration::kAllWorlds }
367 , 349 ,
368 }; 350 };
369 351
370 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageColle ctedMethods[] = { 352 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageColle ctedMethods[] = {
371 {"func", V8TestInterfaceGarbageCollected::funcMethodCallback, 1, v8::None, V 8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigur ation::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 353 {"func", V8TestInterfaceGarbageCollected::funcMethodCallback, 1, v8::None, V 8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigur ation::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
372 {"keys", V8TestInterfaceGarbageCollected::keysMethodCallback, 0, v8::None, V 8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigur ation::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 354 {"keys", V8TestInterfaceGarbageCollected::keysMethodCallback, 0, v8::None, V 8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigur ation::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
373 {"values", V8TestInterfaceGarbageCollected::valuesMethodCallback, 0, v8::Non e, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConf iguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
374 {"entries", V8TestInterfaceGarbageCollected::entriesMethodCallback, 0, v8::N one, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMCo nfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 355 {"entries", V8TestInterfaceGarbageCollected::entriesMethodCallback, 0, v8::N one, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMCo nfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
375 {"forEach", V8TestInterfaceGarbageCollected::forEachMethodCallback, 1, v8::N one, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMCo nfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 356 {"forEach", V8TestInterfaceGarbageCollected::forEachMethodCallback, 1, v8::N one, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMCo nfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
376 {"has", V8TestInterfaceGarbageCollected::hasMethodCallback, 1, v8::None, V8D OMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurat ion::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 357 {"has", V8TestInterfaceGarbageCollected::hasMethodCallback, 1, v8::None, V8D OMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurat ion::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
377 {"add", V8TestInterfaceGarbageCollected::addMethodCallback, 1, v8::None, V8D OMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurat ion::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 358 {"add", V8TestInterfaceGarbageCollected::addMethodCallback, 1, v8::None, V8D OMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurat ion::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
378 {"clear", V8TestInterfaceGarbageCollected::clearMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfig uration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 359 {"clear", V8TestInterfaceGarbageCollected::clearMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfig uration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
379 {"delete", V8TestInterfaceGarbageCollected::deleteMethodCallback, 1, v8::Non e, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConf iguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 360 {"delete", V8TestInterfaceGarbageCollected::deleteMethodCallback, 1, v8::Non e, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConf iguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
380 }; 361 };
381 362
382 void V8TestInterfaceGarbageCollected::constructorCallback(const v8::FunctionCall backInfo<v8::Value>& info) { 363 void V8TestInterfaceGarbageCollected::constructorCallback(const v8::FunctionCall backInfo<v8::Value>& info) {
383 if (!info.IsConstructCall()) { 364 if (!info.IsConstructCall()) {
(...skipping 20 matching lines...) Expand all
404 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate(); 385 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
405 ALLOW_UNUSED_LOCAL(instanceTemplate); 386 ALLOW_UNUSED_LOCAL(instanceTemplate);
406 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template(); 387 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
407 ALLOW_UNUSED_LOCAL(prototypeTemplate); 388 ALLOW_UNUSED_LOCAL(prototypeTemplate);
408 389
409 // Register DOM constants, attributes and operations. 390 // Register DOM constants, attributes and operations.
410 V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedAccesso rs, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedAccessors)); 391 V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedAccesso rs, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedAccessors));
411 V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedMethods)); 392 V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedMethods));
412 393
413 // Iterator (@@iterator) 394 // Iterator (@@iterator)
414 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIte ratorConfiguration = { v8::Symbol::GetIterator, V8TestInterfaceGarbageCollected: :iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DO MConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess }; 395 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIte ratorConfiguration = { v8::Symbol::GetIterator, "values", V8TestInterfaceGarbage Collected::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnProto type, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess };
415 V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration); 396 V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration);
416 } 397 }
417 398
418 v8::Local<v8::FunctionTemplate> V8TestInterfaceGarbageCollected::domTemplate(v8: :Isolate* isolate, const DOMWrapperWorld& world) { 399 v8::Local<v8::FunctionTemplate> V8TestInterfaceGarbageCollected::domTemplate(v8: :Isolate* isolate, const DOMWrapperWorld& world) {
419 return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceGarbageCollectedTemplate); 400 return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceGarbageCollectedTemplate);
420 } 401 }
421 402
422 bool V8TestInterfaceGarbageCollected::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { 403 bool V8TestInterfaceGarbageCollected::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
423 return V8PerIsolateData::From(isolate)->HasInstance(&wrapperTypeInfo, v8Value) ; 404 return V8PerIsolateData::From(isolate)->HasInstance(&wrapperTypeInfo, v8Value) ;
424 } 405 }
425 406
426 v8::Local<v8::Object> V8TestInterfaceGarbageCollected::findInstanceInPrototypeCh ain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { 407 v8::Local<v8::Object> V8TestInterfaceGarbageCollected::findInstanceInPrototypeCh ain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
427 return V8PerIsolateData::From(isolate)->FindInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value); 408 return V8PerIsolateData::From(isolate)->FindInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value);
428 } 409 }
429 410
430 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toImplWithTypeCh eck(v8::Isolate* isolate, v8::Local<v8::Value> value) { 411 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toImplWithTypeCh eck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
431 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr; 412 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr;
432 } 413 }
433 414
434 TestInterfaceGarbageCollected* NativeValueTraits<TestInterfaceGarbageCollected>: :NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& e xceptionState) { 415 TestInterfaceGarbageCollected* NativeValueTraits<TestInterfaceGarbageCollected>: :NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& e xceptionState) {
435 TestInterfaceGarbageCollected* nativeValue = V8TestInterfaceGarbageCollected:: toImplWithTypeCheck(isolate, value); 416 TestInterfaceGarbageCollected* nativeValue = V8TestInterfaceGarbageCollected:: toImplWithTypeCheck(isolate, value);
436 if (!nativeValue) { 417 if (!nativeValue) {
437 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue( 418 exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue(
438 "TestInterfaceGarbageCollected")); 419 "TestInterfaceGarbageCollected"));
439 } 420 }
440 return nativeValue; 421 return nativeValue;
441 } 422 }
442 423
443 } // namespace blink 424 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698