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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl

Issue 2894063002: Expose UseCounter::Feature enum out of blink as WebFeature (Closed)
Patch Set: Rebase update Created 3 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
Index: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
index 6146af2c7f5de7da52d72769ac6b0b4e2aa85ac6..d33c46db7771121fdfa8e5f68fe6ba8c49708464 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -340,10 +340,10 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI
{% set fall_through_to_partial_overloads = not is_partial and overloads.has_partial_overloads %}
{% if overloads.measure_all_as %}
- UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{overloads.measure_all_as}});
+ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{overloads.measure_all_as}});
{% endif %}
{% if overloads.deprecate_all_as %}
- Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{overloads.deprecate_all_as}});
+ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{overloads.deprecate_all_as}});
{% endif %}
{# First resolve by length #}
@@ -362,10 +362,10 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI
{% filter runtime_enabled(not overloads.runtime_enabled_all and method.runtime_enabled_feature_name) %}
if ({{test}}) {
{% if method.measure_as and not overloads.measure_all_as %}
- UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.measure_as('Method')}});
+ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{method.measure_as('Method')}});
{% endif %}
{% if method.deprecate_as and not overloads.deprecate_all_as %}
- Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.deprecate_as}});
+ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{method.deprecate_as}});
{% endif %}
{{method.name}}{{method.overload_index}}Method{{world_suffix}}(info);
return;
@@ -481,10 +481,10 @@ static void postMessageImpl(const char* interfaceName, {{cpp_class}}* instance,
void {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) {
{% if not method.overloads %}{# Overloaded methods are measured in overload_resolution_method() #}
{% if method.measure_as %}
- UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.measure_as('Method')}});
+ UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{method.measure_as('Method')}});
{% endif %}
{% if method.deprecate_as %}
- Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{method.deprecate_as}});
+ Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{method.deprecate_as}});
{% endif %}
{% endif %}{# not method.overloads #}
{% if world_suffix in method.activity_logging_world_list %}

Powered by Google App Engine
This is Rietveld 408576698