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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface_base.cpp

Issue 1381413003: [bindings] add support for integer-indexed @@iterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase just in case Created 5 years, 2 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 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #include "config.h" 2 #include "config.h"
3 {% filter conditional(conditional_string) %} 3 {% filter conditional(conditional_string) %}
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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 ALLOW_UNUSED_LOCAL(instanceTemplate); 341 ALLOW_UNUSED_LOCAL(instanceTemplate);
342 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 342 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
343 ALLOW_UNUSED_LOCAL(prototypeTemplate); 343 ALLOW_UNUSED_LOCAL(prototypeTemplate);
344 {% if custom_registration_methods %} 344 {% if custom_registration_methods %}
345 ExecutionContext* context = currentExecutionContext(isolate); 345 ExecutionContext* context = currentExecutionContext(isolate);
346 ALLOW_UNUSED_LOCAL(context); 346 ALLOW_UNUSED_LOCAL(context);
347 {% endif %} 347 {% endif %}
348 {% if has_access_check_callbacks %} 348 {% if has_access_check_callbacks %}
349 instanceTemplate->SetAccessCheckCallbacks({{cpp_class}}V8Internal::namedSecu rityCheck, {{cpp_class}}V8Internal::indexedSecurityCheck, v8::External::New(isol ate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrapperTypeInfo))); 349 instanceTemplate->SetAccessCheckCallbacks({{cpp_class}}V8Internal::namedSecu rityCheck, {{cpp_class}}V8Internal::indexedSecurityCheck, v8::External::New(isol ate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrapperTypeInfo)));
350 {% endif %} 350 {% endif %}
351 {% if has_array_iterator %}
352 {% filter runtime_enabled('RuntimeEnabledFeatures::iterableCollectionsEnable d') %}
353 {% if is_global %}
354 instanceTemplate->Set(v8::Symbol::GetIterator(isolate), v8::Array::GetValues Iterator(isolate), v8::DontEnum);
Toon Verwaest 2015/10/14 10:59:42 Instance templates that are supposed to be instant
caitp (gmail) 2015/10/14 12:32:03 It sounds like the non-global interfaces could als
355 {% else %}
356 prototypeTemplate->Set(v8::Symbol::GetIterator(isolate), v8::Array::GetValue sIterator(isolate), v8::DontEnum);
357 {% endif %}
358 {% endfilter %}{# runtime_enabled() #}
359 {% endif %}
351 {% for attribute in attributes 360 {% for attribute in attributes
352 if attribute.runtime_enabled_function and 361 if attribute.runtime_enabled_function and
353 not attribute.exposed_test %} 362 not attribute.exposed_test %}
354 {% filter conditional(attribute.conditional_string) %} 363 {% filter conditional(attribute.conditional_string) %}
355 if ({{attribute.runtime_enabled_function}}()) { 364 if ({{attribute.runtime_enabled_function}}()) {
356 {% if attribute.is_data_type_property %} 365 {% if attribute.is_data_type_property %}
357 const V8DOMConfiguration::AttributeConfiguration attributeConfiguration = \ 366 const V8DOMConfiguration::AttributeConfiguration attributeConfiguration = \
358 {{attribute_configuration(attribute)}}; 367 {{attribute_configuration(attribute)}};
359 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp eTemplate, attributeConfiguration); 368 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp eTemplate, attributeConfiguration);
360 {% else %} 369 {% else %}
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 {% endfor %} 454 {% endfor %}
446 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 455 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
447 {{attribute_getter_implemented_in_private_script(attribute)}} 456 {{attribute_getter_implemented_in_private_script(attribute)}}
448 {% if attribute.has_setter %} 457 {% if attribute.has_setter %}
449 {{attribute_setter_implemented_in_private_script(attribute)}} 458 {{attribute_setter_implemented_in_private_script(attribute)}}
450 {% endif %} 459 {% endif %}
451 {% endfor %} 460 {% endfor %}
452 {% block partial_interface %}{% endblock %} 461 {% block partial_interface %}{% endblock %}
453 } // namespace blink 462 } // namespace blink
454 {% endfilter %} 463 {% endfilter %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698