Chromium Code Reviews| 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 {{install_indexed_property_handler('instanceTemplate') | indent(2)}} | 507 {{install_indexed_property_handler('instanceTemplate') | indent(2)}} |
| 508 {% endif %} | 508 {% endif %} |
| 509 {% if named_property_getter and not is_partial and not has_named_properties_ob ject %} | 509 {% if named_property_getter and not is_partial and not has_named_properties_ob ject %} |
| 510 // Named properties | 510 // Named properties |
| 511 {{install_named_property_handler('instanceTemplate') | indent(2)}} | 511 {{install_named_property_handler('instanceTemplate') | indent(2)}} |
| 512 {% endif %} | 512 {% endif %} |
| 513 | 513 |
| 514 {% if has_array_iterator and not is_partial %} | 514 {% if has_array_iterator and not is_partial %} |
| 515 // Array iterator (@@iterator) | 515 // Array iterator (@@iterator) |
| 516 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set IntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values, v8::DontEnum); | 516 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set IntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values, v8::DontEnum); |
| 517 {% if iterable %} | |
| 518 // For value iterators, the properties below must originally be set to the cor responding ones in %ArrayPrototype%. | |
| 519 // See https://heycam.github.io/webidl/#es-iterators. | |
| 520 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set IntrinsicDataProperty(v8AtomicString(isolate, "entries"), v8::kArrayProto_entrie s); | |
|
Yuki
2017/02/09 08:01:56
This is just fine, but I think [Global] or [Primar
Raphael Kubo da Costa (rakuco)
2017/02/09 10:14:28
While I haven't encountered any uses of [Global]/[
Yuki
2017/02/09 13:03:18
Yes, that's true. My point is that we don't want
| |
| 521 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set IntrinsicDataProperty(v8AtomicString(isolate, "forEach"), v8::kArrayProto_forEac h); | |
| 522 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set IntrinsicDataProperty(v8AtomicString(isolate, "keys"), v8::kArrayProto_keys); | |
| 523 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->Set IntrinsicDataProperty(v8AtomicString(isolate, "values"), v8::kArrayProto_values) ; | |
| 524 {% endif %} | |
| 517 {% endif %} | 525 {% endif %} |
| 518 | 526 |
| 519 {% if iterator_method %} | 527 {% if iterator_method %} |
| 520 {% filter exposed(iterator_method.exposed_test) %} | 528 {% filter exposed(iterator_method.exposed_test) %} |
| 521 {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %} | 529 {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %} |
| 522 // Iterator (@@iterator) | 530 // Iterator (@@iterator) |
| 523 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo nfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethod Callback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; | 531 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo nfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethod Callback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; |
| 524 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration); | 532 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration); |
| 525 {% endfilter %} | 533 {% endfilter %} |
| 526 {% endfilter %} | 534 {% endfilter %} |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 694 {% block has_instance %}{% endblock %} | 702 {% block has_instance %}{% endblock %} |
| 695 {% block to_impl %}{% endblock %} | 703 {% block to_impl %}{% endblock %} |
| 696 {% block to_impl_with_type_check %}{% endblock %} | 704 {% block to_impl_with_type_check %}{% endblock %} |
| 697 {##############################################################################} | 705 {##############################################################################} |
| 698 {% block prepare_prototype_and_interface_object %}{% endblock %} | 706 {% block prepare_prototype_and_interface_object %}{% endblock %} |
| 699 {##############################################################################} | 707 {##############################################################################} |
| 700 {% block partial_interface %}{% endblock %} | 708 {% block partial_interface %}{% endblock %} |
| 701 } // namespace blink | 709 } // namespace blink |
| 702 | 710 |
| 703 {% endfilter %}{# format_blink_cpp_source_code #} | 711 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |