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

Unified Diff: Source/bindings/templates/methods.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/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 9affae262495d67d4fd6fdb460ec011387010573..caa2017a20a34e3e44399b1c46ba83e20ba60e43 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -347,10 +347,12 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI
switch (std::min({{overloads.maxarg}}, info.Length())) {
{# 3. Remove from S all entries whose type list is not of length argcount. #}
{% for length, tests_methods in overloads.length_tests_methods %}
+ {# 10. If i = d, then: #}
case {{length}}:
{# Then resolve by testing argument #}
{% for test, method in tests_methods %}
- {# 10. If i = d, then: #}
+ {% filter runtime_enabled(not overloads.runtime_enabled_function_all and
+ method.runtime_enabled_function) %}
if ({{test}}) {
{% if method.measure_as and not overloads.measure_all_as %}
UseCounter::count(callingExecutionContext(isolate), UseCounter::{{method.measure_as}});
@@ -361,6 +363,7 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI
{{method.name}}{{method.overload_index}}Method{{world_suffix}}(info);
return;
}
+ {% endfilter %}
{% endfor %}
break;
{% endfor %}

Powered by Google App Engine
This is Rietveld 408576698