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

Unified Diff: Source/bindings/tests/results/V8TestInterface.cpp

Issue 127723002: Add use counters for using Attrs as Nodes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring patch to head. Created 6 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
« no previous file with comments | « Source/bindings/tests/results/V8TestEventTarget.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestInterface.cpp
diff --git a/Source/bindings/tests/results/V8TestInterface.cpp b/Source/bindings/tests/results/V8TestInterface.cpp
index bec1673e11e61edb365c5912563d758885d3fea9..4d34a39cafe47281ee483f56147af6b99dd8ac92 100644
--- a/Source/bindings/tests/results/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/V8TestInterface.cpp
@@ -35,6 +35,7 @@
#include "V8TestInterface.h"
#include "RuntimeEnabledFeatures.h"
+#include "V8Attr.h"
#include "V8Node.h"
#include "V8NodeList.h"
#include "V8ReferencedType.h"
@@ -48,6 +49,7 @@
#include "bindings/v8/V8ObjectConstructor.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
+#include "core/frame/UseCounter.h"
#include "platform/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefPtr.h"
@@ -194,6 +196,8 @@ static void implementsNodeAttributeSetter(v8::Local<v8::Value> jsValue, const v8
static void implementsNodeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
+ UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodeParameter);
TestInterfaceV8Internal::implementsNodeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -249,6 +253,8 @@ static void Node23AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
static void Node23AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
+ UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodeParameter);
TestInterfaceV8Internal::Node23AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -276,6 +282,8 @@ static void Node24AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
static void Node24AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
+ UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodeParameter);
TestInterfaceV8Internal::Node24AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -429,6 +437,8 @@ static void supplementalNodeAttributeSetter(v8::Local<v8::Value> jsValue, const
static void supplementalNodeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
+ UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodeParameter);
TestInterfaceV8Internal::supplementalNodeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -464,6 +474,8 @@ static void Node13AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
static void Node13AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
+ UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodeParameter);
TestInterfaceV8Internal::Node13AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -499,6 +511,8 @@ static void Node14AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
static void Node14AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
+ UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodeParameter);
TestInterfaceV8Internal::Node14AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -534,6 +548,8 @@ static void Node15AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
static void Node15AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
+ UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodeParameter);
TestInterfaceV8Internal::Node15AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
« no previous file with comments | « Source/bindings/tests/results/V8TestEventTarget.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698