OLD | NEW |
1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
2 | 2 |
3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
4 #include "{{v8_class_or_partial}}.h" | 4 #include "{{v8_class_or_partial}}.h" |
5 | 5 |
6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
7 #include "{{filename}}" | 7 #include "{{filename}}" |
8 {% endfor %} | 8 {% endfor %} |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 {% if iterator_method %} | 521 {% if iterator_method %} |
522 {% filter exposed(iterator_method.exposed_test) %} | 522 {% filter exposed(iterator_method.exposed_test) %} |
523 {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %} | 523 {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %} |
524 // Iterator (@@iterator) | 524 // Iterator (@@iterator) |
525 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethod
Callback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; | 525 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethod
Callback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; |
526 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); | 526 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); |
527 {% endfilter %} | 527 {% endfilter %} |
528 {% endfilter %} | 528 {% endfilter %} |
529 {% endif %} | 529 {% endif %} |
530 | 530 |
| 531 {% if interface_name == 'Location' %} |
| 532 // Symbol.toPrimitive |
| 533 // Prevent author scripts to inject Symbol.toPrimitive property into location |
| 534 // objects, also prevent the look-up of Symbol.toPrimitive through the |
| 535 // prototype chain. |
| 536 instanceTemplate->Set(v8::Symbol::GetToPrimitive(isolate), |
| 537 v8::Undefined(isolate), |
| 538 static_cast<v8::PropertyAttribute>( |
| 539 v8::ReadOnly | v8::DontEnum | v8::DontDelete)); |
| 540 {% endif %} |
| 541 |
531 {% if legacy_caller and not is_partial %} | 542 {% if legacy_caller and not is_partial %} |
532 instanceTemplate->SetCallAsFunctionHandler({{cpp_class_or_partial}}V8Internal:
:{{legacy_caller.name}}MethodCallback); | 543 instanceTemplate->SetCallAsFunctionHandler({{cpp_class_or_partial}}V8Internal:
:{{legacy_caller.name}}MethodCallback); |
533 {% elif has_custom_legacy_call_as_function and not is_partial %} | 544 {% elif has_custom_legacy_call_as_function and not is_partial %} |
534 instanceTemplate->SetCallAsFunctionHandler({{v8_class}}::legacyCallCustom); | 545 instanceTemplate->SetCallAsFunctionHandler({{v8_class}}::legacyCallCustom); |
535 {% endif %} | 546 {% endif %} |
536 | 547 |
537 {% if interface_name == 'HTMLAllCollection' and not is_partial %} | 548 {% if interface_name == 'HTMLAllCollection' and not is_partial %} |
538 // Needed for legacy support of document.all | 549 // Needed for legacy support of document.all |
539 instanceTemplate->MarkAsUndetectable(); | 550 instanceTemplate->MarkAsUndetectable(); |
540 {% endif %} | 551 {% endif %} |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 {% block has_instance %}{% endblock %} | 696 {% block has_instance %}{% endblock %} |
686 {% block to_impl %}{% endblock %} | 697 {% block to_impl %}{% endblock %} |
687 {% block to_impl_with_type_check %}{% endblock %} | 698 {% block to_impl_with_type_check %}{% endblock %} |
688 {##############################################################################} | 699 {##############################################################################} |
689 {% block prepare_prototype_and_interface_object %}{% endblock %} | 700 {% block prepare_prototype_and_interface_object %}{% endblock %} |
690 {##############################################################################} | 701 {##############################################################################} |
691 {% block partial_interface %}{% endblock %} | 702 {% block partial_interface %}{% endblock %} |
692 } // namespace blink | 703 } // namespace blink |
693 | 704 |
694 {% endfilter %}{# format_blink_cpp_source_code #} | 705 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |