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

Unified Diff: Source/bindings/templates/interface.cpp

Issue 299203002: Support per-overload [RuntimeEnabled] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: refactor runtime_enabled() filtering Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index 7078e454decd8f034d5359708d056b968aef5bfb..81992ddc87d3f25b053761712ac162beaadc0de4 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -986,11 +986,14 @@ static void configure{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> funct
{# Needed for legacy support of document.all #}
functionTemplate->InstanceTemplate()->MarkAsUndetectable();
{% endif %}
- {% for method in methods if not method.do_not_check_signature %}
+ {% for method in methods %}
{# install_custom_signature #}
- {% if not method.overload_index or method.overload_index == 1 %}
+ {% if not(method.overloads.do_not_check_signature_all if method.overloads else
+ (method.overload_index or method.do_not_check_signature)) %}
{# For overloaded methods, only generate one accessor #}
{% filter conditional(method.conditional_string) %}
+ {% filter runtime_enabled(method.overloads.runtime_enabled_function_all if method.overloads else
Jens Widell 2014/06/04 11:20:28 This is wrong if all overloads are runtime enabled
Jens Widell 2014/06/05 08:51:51 It occurs to me that the "Function.length is dynam
+ method.runtime_enabled_function) %}
{% if method.is_do_not_check_security %}
{% if method.is_per_world_bindings %}
if (DOMWrapperWorld::current(isolate).isMainWorld()) {
@@ -1004,21 +1007,16 @@ static void configure{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> funct
{% else %}{# is_do_not_check_security #}
{% if method.is_per_world_bindings %}
if (DOMWrapperWorld::current(isolate).isMainWorld()) {
- {% filter runtime_enabled(method.runtime_enabled_function) %}
{{install_custom_signature(method, 'ForMainWorld')}}
- {% endfilter %}
} else {
- {% filter runtime_enabled(method.runtime_enabled_function) %}
{{install_custom_signature(method)}}
- {% endfilter %}
}
{% else %}
- {% filter runtime_enabled(method.runtime_enabled_function) %}
{{install_custom_signature(method)}}
- {% endfilter %}
{% endif %}
{% endif %}{# is_do_not_check_security #}
- {% endfilter %}
+ {% endfilter %}{# runtime_enabled() #}
+ {% endfilter %}{# conditional() #}
{% endif %}{# install_custom_signature #}
{% endfor %}
{% for attribute in attributes if attribute.is_static %}
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698