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

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: rebased 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..65d9db234705c18f76ff34200413ae3ba50cdeb1 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -988,6 +988,8 @@ 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
Nils Barth (inactive) 2014/06/12 11:45:06 Could you wrap this line?
+ method.runtime_enabled_function) %}
{% if method.is_do_not_check_security %}
{% if method.is_per_world_bindings %}
if (DOMWrapperWorld::current(isolate).isMainWorld()) {
@@ -1001,21 +1003,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) %}
Nils Barth (inactive) 2014/06/12 11:45:06 Thanks, this is a lot nicer.
{{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