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

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

Issue 922233002: bindings: Makes runtime-enabled attributes on prototype chains compilable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 {% filter conditional(conditional_string) %} 8 {% filter conditional(conditional_string) %}
9 #include "{{v8_class_or_partial}}.h" 9 #include "{{v8_class_or_partial}}.h"
10 10
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 {% if has_access_check_callbacks %} 320 {% if has_access_check_callbacks %}
321 instanceTemplate->SetAccessCheckCallbacks({{cpp_class}}V8Internal::namedSecu rityCheck, {{cpp_class}}V8Internal::indexedSecurityCheck, v8::External::New(isol ate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrapperTypeInfo))); 321 instanceTemplate->SetAccessCheckCallbacks({{cpp_class}}V8Internal::namedSecu rityCheck, {{cpp_class}}V8Internal::indexedSecurityCheck, v8::External::New(isol ate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrapperTypeInfo)));
322 {% endif %} 322 {% endif %}
323 {% for attribute in attributes 323 {% for attribute in attributes
324 if attribute.runtime_enabled_function and 324 if attribute.runtime_enabled_function and
325 not attribute.per_context_enabled_function and 325 not attribute.per_context_enabled_function and
326 not attribute.exposed_test and 326 not attribute.exposed_test and
327 not attribute.is_static %} 327 not attribute.is_static %}
328 {% filter conditional(attribute.conditional_string) %} 328 {% filter conditional(attribute.conditional_string) %}
329 if ({{attribute.runtime_enabled_function}}()) { 329 if ({{attribute.runtime_enabled_function}}()) {
330 {% if attribute.is_expose_js_accessors %}
331 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\
332 {{attribute_configuration(attribute)}};
333 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype Template, defaultSignature, accessorConfiguration);
334 {% else %}
330 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 335 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
331 {{attribute_configuration(attribute)}}; 336 {{attribute_configuration(attribute)}};
332 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 337 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp eTemplate, attributeConfiguration);
338 {% endif %}
333 } 339 }
334 {% endfilter %} 340 {% endfilter %}
335 {% endfor %} 341 {% endfor %}
336 {% if constants %} 342 {% if constants %}
337 {{install_constants() | indent}} 343 {{install_constants() | indent}}
338 {% endif %} 344 {% endif %}
339 {# Special operations #} 345 {# Special operations #}
340 {# V8 has access-check callback API and it\'s used on Window instead of 346 {# V8 has access-check callback API and it\'s used on Window instead of
341 deleters or enumerators; see ObjectTemplate::SetAccessCheckCallbacks. 347 deleters or enumerators; see ObjectTemplate::SetAccessCheckCallbacks.
342 In addition, the getter should be set on the prototype template, to get 348 In addition, the getter should be set on the prototype template, to get
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 config.flags = v8::PropertyHandlerFlags::kAllCanRead; 394 config.flags = v8::PropertyHandlerFlags::kAllCanRead;
389 {% endif %} 395 {% endif %}
390 functionTemplate->{{set_on_template}}()->SetHandler(config); 396 functionTemplate->{{set_on_template}}()->SetHandler(config);
391 } 397 }
392 {% endif %} 398 {% endif %}
393 {% if iterator_method %} 399 {% if iterator_method %}
394 {% filter per_context_enabled(iterator_method.per_context_enabled_function) %} 400 {% filter per_context_enabled(iterator_method.per_context_enabled_function) %}
395 {% filter exposed(iterator_method.exposed_test) %} 401 {% filter exposed(iterator_method.exposed_test) %}
396 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} 402 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %}
397 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 403 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
398 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate); 404 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration);
399 {% endfilter %}{# runtime_enabled() #} 405 {% endfilter %}{# runtime_enabled() #}
400 {% endfilter %}{# exposed() #} 406 {% endfilter %}{# exposed() #}
401 {% endfilter %}{# per_context_enabled() #} 407 {% endfilter %}{# per_context_enabled() #}
402 {% endif %} 408 {% endif %}
403 {# End special operations #} 409 {# End special operations #}
404 {% if has_custom_legacy_call_as_function %} 410 {% if has_custom_legacy_call_as_function %}
405 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom); 411 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom);
406 {% endif %} 412 {% endif %}
407 {% if interface_name == 'HTMLAllCollection' %} 413 {% if interface_name == 'HTMLAllCollection' %}
408 {# Needed for legacy support of document.all #} 414 {# Needed for legacy support of document.all #}
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 {% endfor %} 491 {% endfor %}
486 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 492 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
487 {{attribute_getter_implemented_in_private_script(attribute)}} 493 {{attribute_getter_implemented_in_private_script(attribute)}}
488 {% if not attribute.is_read_only or attribute.put_forwards %} 494 {% if not attribute.is_read_only or attribute.put_forwards %}
489 {{attribute_setter_implemented_in_private_script(attribute)}} 495 {{attribute_setter_implemented_in_private_script(attribute)}}
490 {% endif %} 496 {% endif %}
491 {% endfor %} 497 {% endfor %}
492 {% block partial_interface %}{% endblock %} 498 {% block partial_interface %}{% endblock %}
493 } // namespace blink 499 } // namespace blink
494 {% endfilter %} 500 {% endfilter %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698