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

Unified Diff: Source/bindings/templates/attributes.cpp

Issue 656693002: Don't count UseCounters in private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index 0c2875bc49cbd8be2c352e946d9df93409183d10..be681384231dbafaed4966122263aa2f4da1ac30 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -147,10 +147,10 @@ v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
{% if attribute.deprecate_as %}
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}});
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}});
{% endif %}
{% if attribute.measure_as %}
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as}});
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as}});
{% endif %}
{% if world_suffix in attribute.activity_logging_world_list_for_getter %}
ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
@@ -180,10 +180,10 @@ static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
{% if attribute.deprecate_as %}
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}});
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}});
{% endif %}
{% if attribute.measure_as %}
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as}});
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as}});
{% endif %}
{{cpp_class}}V8Internal::{{cpp_class}}ConstructorGetter{{world_suffix}}(property, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
@@ -300,10 +300,10 @@ v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
{% endif %}
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
{% if attribute.deprecate_as %}
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}});
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}});
{% endif %}
{% if attribute.measure_as %}
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as}});
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as}});
{% endif %}
{% if world_suffix in attribute.activity_logging_world_list_for_setter %}
ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
« no previous file with comments | « Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp ('k') | Source/bindings/templates/constants.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698