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. | 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 247 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
248 | 248 |
249 Iterator* result = impl->keysForBinding(scriptState, exceptionState); | 249 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
250 if (exceptionState.HadException()) { | 250 if (exceptionState.HadException()) { |
251 return; | 251 return; |
252 } | 252 } |
253 V8SetReturnValue(info, result); | 253 V8SetReturnValue(info, result); |
254 } | 254 } |
255 | 255 |
256 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { | |
257 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface2", "values"); | |
258 | |
259 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | |
260 | |
261 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | |
262 | |
263 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); | |
264 if (exceptionState.HadException()) { | |
265 return; | |
266 } | |
267 V8SetReturnValue(info, result); | |
268 } | |
269 | |
270 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { | 256 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
271 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface2", "entries"); | 257 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface2", "entries"); |
272 | 258 |
273 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | 259 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
274 | 260 |
275 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 261 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
276 | 262 |
277 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); | 263 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
278 if (exceptionState.HadException()) { | 264 if (exceptionState.HadException()) { |
279 return; | 265 return; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 } | 500 } |
515 | 501 |
516 void V8TestInterface2::stringifierMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 502 void V8TestInterface2::stringifierMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
517 TestInterface2V8Internal::stringifierMethodMethod(info); | 503 TestInterface2V8Internal::stringifierMethodMethod(info); |
518 } | 504 } |
519 | 505 |
520 void V8TestInterface2::keysMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 506 void V8TestInterface2::keysMethodCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
521 TestInterface2V8Internal::keysMethod(info); | 507 TestInterface2V8Internal::keysMethod(info); |
522 } | 508 } |
523 | 509 |
524 void V8TestInterface2::valuesMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | |
525 TestInterface2V8Internal::valuesMethod(info); | |
526 } | |
527 | |
528 void V8TestInterface2::entriesMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 510 void V8TestInterface2::entriesMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
529 TestInterface2V8Internal::entriesMethod(info); | 511 TestInterface2V8Internal::entriesMethod(info); |
530 } | 512 } |
531 | 513 |
532 void V8TestInterface2::forEachMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 514 void V8TestInterface2::forEachMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
533 TestInterface2V8Internal::forEachMethod(info); | 515 TestInterface2V8Internal::forEachMethod(info); |
534 } | 516 } |
535 | 517 |
536 void V8TestInterface2::hasMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { | 518 void V8TestInterface2::hasMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { |
537 TestInterface2V8Internal::hasMethod(info); | 519 TestInterface2V8Internal::hasMethod(info); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] =
{ | 583 static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] =
{ |
602 {"legacyCaller", V8TestInterface2::legacyCallerMethodCallback, 1, v8::None,
V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigu
ration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 584 {"legacyCaller", V8TestInterface2::legacyCallerMethodCallback, 1, v8::None,
V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigu
ration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
603 {"item", V8TestInterface2::itemMethodCallback, 1, v8::None, V8DOMConfigurati
on::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCh
eckAccess, V8DOMConfiguration::kAllWorlds}, | 585 {"item", V8TestInterface2::itemMethodCallback, 1, v8::None, V8DOMConfigurati
on::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCh
eckAccess, V8DOMConfiguration::kAllWorlds}, |
604 {"setItem", V8TestInterface2::setItemMethodCallback, 2, v8::None, V8DOMConfi
guration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kD
oNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 586 {"setItem", V8TestInterface2::setItemMethodCallback, 2, v8::None, V8DOMConfi
guration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kD
oNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
605 {"deleteItem", V8TestInterface2::deleteItemMethodCallback, 1, v8::None, V8DO
MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati
on::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 587 {"deleteItem", V8TestInterface2::deleteItemMethodCallback, 1, v8::None, V8DO
MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati
on::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
606 {"namedItem", V8TestInterface2::namedItemMethodCallback, 1, v8::None, V8DOMC
onfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration
::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 588 {"namedItem", V8TestInterface2::namedItemMethodCallback, 1, v8::None, V8DOMC
onfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration
::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
607 {"setNamedItem", V8TestInterface2::setNamedItemMethodCallback, 2, v8::None,
V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigu
ration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 589 {"setNamedItem", V8TestInterface2::setNamedItemMethodCallback, 2, v8::None,
V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigu
ration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
608 {"deleteNamedItem", V8TestInterface2::deleteNamedItemMethodCallback, 1, v8::
None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMC
onfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 590 {"deleteNamedItem", V8TestInterface2::deleteNamedItemMethodCallback, 1, v8::
None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMC
onfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
609 {"stringifierMethod", V8TestInterface2::stringifierMethodMethodCallback, 0,
v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8
DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 591 {"stringifierMethod", V8TestInterface2::stringifierMethodMethodCallback, 0,
v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8
DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
610 {"keys", V8TestInterface2::keysMethodCallback, 0, v8::None, V8DOMConfigurati
on::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCh
eckAccess, V8DOMConfiguration::kAllWorlds}, | 592 {"keys", V8TestInterface2::keysMethodCallback, 0, v8::None, V8DOMConfigurati
on::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCh
eckAccess, V8DOMConfiguration::kAllWorlds}, |
611 {"values", V8TestInterface2::valuesMethodCallback, 0, v8::None, V8DOMConfigu
ration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoN
otCheckAccess, V8DOMConfiguration::kAllWorlds}, | |
612 {"entries", V8TestInterface2::entriesMethodCallback, 0, v8::None, V8DOMConfi
guration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kD
oNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 593 {"entries", V8TestInterface2::entriesMethodCallback, 0, v8::None, V8DOMConfi
guration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kD
oNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
613 {"forEach", V8TestInterface2::forEachMethodCallback, 1, v8::None, V8DOMConfi
guration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kD
oNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 594 {"forEach", V8TestInterface2::forEachMethodCallback, 1, v8::None, V8DOMConfi
guration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kD
oNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
614 {"has", V8TestInterface2::hasMethodCallback, 1, v8::None, V8DOMConfiguration
::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotChec
kAccess, V8DOMConfiguration::kAllWorlds}, | 595 {"has", V8TestInterface2::hasMethodCallback, 1, v8::None, V8DOMConfiguration
::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotChec
kAccess, V8DOMConfiguration::kAllWorlds}, |
615 {"toString", V8TestInterface2::toStringMethodCallback, 0, v8::None, V8DOMCon
figuration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::
kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 596 {"toString", V8TestInterface2::toStringMethodCallback, 0, v8::None, V8DOMCon
figuration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::
kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
616 }; | 597 }; |
617 | 598 |
618 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 599 void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
619 if (!info.IsConstructCall()) { | 600 if (!info.IsConstructCall()) { |
620 V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::Const
ructorNotCallableAsFunction("TestInterface2")); | 601 V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::Const
ructorNotCallableAsFunction("TestInterface2")); |
621 return; | 602 return; |
(...skipping 30 matching lines...) Expand all Loading... |
652 V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGT
H(V8TestInterface2Methods)); | 633 V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGT
H(V8TestInterface2Methods)); |
653 | 634 |
654 // Indexed properties | 635 // Indexed properties |
655 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInt
erface2::indexedPropertyGetterCallback, V8TestInterface2::indexedPropertySetterC
allback, nullptr, V8TestInterface2::indexedPropertyDeleterCallback, IndexedPrope
rtyEnumerator<TestInterface2>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags:
:kNone); | 636 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInt
erface2::indexedPropertyGetterCallback, V8TestInterface2::indexedPropertySetterC
allback, nullptr, V8TestInterface2::indexedPropertyDeleterCallback, IndexedPrope
rtyEnumerator<TestInterface2>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags:
:kNone); |
656 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); | 637 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); |
657 // Named properties | 638 // Named properties |
658 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestInterfa
ce2::namedPropertyGetterCallback, V8TestInterface2::namedPropertySetterCallback,
V8TestInterface2::namedPropertyQueryCallback, V8TestInterface2::namedPropertyDe
leterCallback, V8TestInterface2::namedPropertyEnumeratorCallback, v8::Local<v8::
Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kO
nlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking))); | 639 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestInterfa
ce2::namedPropertyGetterCallback, V8TestInterface2::namedPropertySetterCallback,
V8TestInterface2::namedPropertyQueryCallback, V8TestInterface2::namedPropertyDe
leterCallback, V8TestInterface2::namedPropertyEnumeratorCallback, v8::Local<v8::
Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kO
nlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking))); |
659 instanceTemplate->SetHandler(namedPropertyHandlerConfig); | 640 instanceTemplate->SetHandler(namedPropertyHandlerConfig); |
660 | 641 |
661 // Iterator (@@iterator) | 642 // Iterator (@@iterator) |
662 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIte
ratorConfiguration = { v8::Symbol::GetIterator, V8TestInterface2::iteratorMethod
Callback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess }; | 643 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIte
ratorConfiguration = { v8::Symbol::GetIterator, "values", V8TestInterface2::iter
atorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConf
iguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess }; |
663 V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); | 644 V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); |
664 | 645 |
665 instanceTemplate->SetCallAsFunctionHandler(TestInterface2V8Internal::legacyCal
lerMethodCallback); | 646 instanceTemplate->SetCallAsFunctionHandler(TestInterface2V8Internal::legacyCal
lerMethodCallback); |
666 } | 647 } |
667 | 648 |
668 v8::Local<v8::FunctionTemplate> V8TestInterface2::domTemplate(v8::Isolate* isola
te, const DOMWrapperWorld& world) { | 649 v8::Local<v8::FunctionTemplate> V8TestInterface2::domTemplate(v8::Isolate* isola
te, const DOMWrapperWorld& world) { |
669 return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), V8TestInterface2::installV8TestInterface2TemplateF
unction); | 650 return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), V8TestInterface2::installV8TestInterface2TemplateF
unction); |
670 } | 651 } |
671 | 652 |
672 bool V8TestInterface2::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* is
olate) { | 653 bool V8TestInterface2::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* is
olate) { |
(...skipping 28 matching lines...) Expand all Loading... |
701 | 682 |
702 V8TestInterface2::installV8TestInterface2TemplateFunction = | 683 V8TestInterface2::installV8TestInterface2TemplateFunction = |
703 installTemplateFunction; | 684 installTemplateFunction; |
704 if (preparePrototypeAndInterfaceObjectFunction) { | 685 if (preparePrototypeAndInterfaceObjectFunction) { |
705 V8TestInterface2::wrapperTypeInfo.prepare_prototype_and_interface_object_fun
ction = | 686 V8TestInterface2::wrapperTypeInfo.prepare_prototype_and_interface_object_fun
ction = |
706 preparePrototypeAndInterfaceObjectFunction; | 687 preparePrototypeAndInterfaceObjectFunction; |
707 } | 688 } |
708 } | 689 } |
709 | 690 |
710 } // namespace blink | 691 } // namespace blink |
OLD | NEW |