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

Unified Diff: Source/bindings/tests/results/core/V8TestObject.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/tests/results/core/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index c2ce1858fd9fd1968886a20136d6174ab85de177..10c5f35263694a4d52f4c2cc0ac70f9f85c41ca3 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -81,7 +81,7 @@ namespace TestObjectV8Internal {
static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::Constant);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::Constant);
v8SetReturnValueInt(info, 1);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -89,7 +89,7 @@ static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::String>, con
static void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Constant);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::Constant);
v8SetReturnValueInt(info, 1);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -2220,7 +2220,7 @@ static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf
static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -2237,7 +2237,7 @@ static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -2401,7 +2401,7 @@ static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo
static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -2418,7 +2418,7 @@ static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -4935,7 +4935,7 @@ static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstructorAttribute);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstructorAttribute);
TestObjectV8Internal::TestObjectConstructorGetter(property, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -4943,7 +4943,7 @@ static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::
static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::FeatureName);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::FeatureName);
TestObjectV8Internal::TestObjectConstructorGetter(property, info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -8656,7 +8656,7 @@ static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::voidMethod);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::voidMethod);
TestObjectV8Internal::deprecatedVoidMethodMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -8696,7 +8696,7 @@ static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
TestObjectV8Internal::measureAsVoidMethodMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
@@ -8724,14 +8724,14 @@ static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8:
switch (std::min(1, info.Length())) {
case 0:
if (true) {
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
DeprecateAsOverloadedMethod1Method(info);
return;
}
break;
case 1:
if (true) {
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
DeprecateAsOverloadedMethod2Method(info);
return;
}
@@ -8772,7 +8772,7 @@ static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba
static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
switch (std::min(1, info.Length())) {
case 0:
if (true) {
@@ -8825,14 +8825,14 @@ static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V
switch (std::min(1, info.Length())) {
case 0:
if (true) {
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
measureAsOverloadedMethod1Method(info);
return;
}
break;
case 1:
if (true) {
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
measureAsOverloadedMethod2Method(info);
return;
}
@@ -8873,7 +8873,7 @@ static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback
static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
switch (std::min(1, info.Length())) {
case 0:
if (true) {
@@ -8923,18 +8923,18 @@ static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct
static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
switch (std::min(1, info.Length())) {
case 0:
if (true) {
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
deprecateAsMeasureAsSameValueOverloadedMethod1Method(info);
return;
}
break;
case 1:
if (true) {
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
deprecateAsMeasureAsSameValueOverloadedMethod2Method(info);
return;
}
@@ -8975,18 +8975,18 @@ static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct
static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
switch (std::min(1, info.Length())) {
case 0:
if (true) {
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
deprecateAsSameValueMeasureAsOverloadedMethod1Method(info);
return;
}
break;
case 1:
if (true) {
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
deprecateAsSameValueMeasureAsOverloadedMethod2Method(info);
return;
}
@@ -9027,8 +9027,8 @@ static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const
static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
- UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
- UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
+ UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
switch (std::min(1, info.Length())) {
case 0:
if (true) {
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698