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

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

Issue 1579573002: Count feature usage for the current context instead of the calling one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp b/third_party/WebKit/Source/bindings/templates/methods.cpp
index 412cbfcf14210b929aac7fec4d0dfad476dbd444..f5df6678b33f24d328d80d7bfa8cb474432424c8 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp
@@ -399,10 +399,10 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{overloads.name}}", "{{interface_name}}", info.Holder(), info.GetIsolate());
{% if overloads.measure_all_as %}
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{overloads.measure_all_as}});
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.measure_all_as}});
{% endif %}
{% if overloads.deprecate_all_as %}
- UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{overloads.deprecate_all_as}});
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.deprecate_all_as}});
{% endif %}
{# First resolve by length #}
{# 2. Initialize argcount to be min(maxarg, n). #}
@@ -418,10 +418,10 @@ static void {{overloads.name}}Method{{world_suffix}}(const v8::FunctionCallbackI
method.runtime_enabled_function) %}
if ({{test}}) {
{% if method.measure_as and not overloads.measure_all_as %}
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}});
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}});
{% endif %}
{% if method.deprecate_as and not overloads.deprecate_all_as %}
- UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
{% endif %}
{{method.name}}{{method.overload_index}}Method{{world_suffix}}(info);
return;
@@ -505,10 +505,10 @@ static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
{% if not method.overloads %}{# Overloaded methods are measured in overload_resolution_method() #}
{% if method.measure_as %}
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}});
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}});
{% endif %}
{% if method.deprecate_as %}
- UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
{% endif %}
{% if method.is_api_experiment_enabled %}
{{check_api_experiment(method) | indent}}

Powered by Google App Engine
This is Rietveld 408576698