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

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: move comment Created 6 years, 6 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
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index f5c612b94dea1831bb495aa63b684cb6b4320fa3..0b5e8685d1b0fb77150a8857455b5fe2316f909b 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -988,6 +988,9 @@ static void configure{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> funct
{% for method in custom_registration_methods %}
{# install_custom_signature #}
{% filter conditional(method.conditional_string) %}
+ {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
+ if method.overloads else
+ method.runtime_enabled_function) %}
{% if method.is_do_not_check_security %}
{% if method.is_per_world_bindings %}
if (DOMWrapperWorld::current(isolate).isMainWorld()) {
@@ -1001,21 +1004,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() #}
{% endfor %}
{% for attribute in attributes if attribute.is_static %}
{% set getter_callback = '%sV8Internal::%sAttributeGetterCallback' %

Powered by Google App Engine
This is Rietveld 408576698