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

Unified Diff: Source/bindings/tests/results/V8SupportTestInterface.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/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestEventTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8SupportTestInterface.cpp
diff --git a/Source/bindings/tests/results/V8SupportTestInterface.cpp b/Source/bindings/tests/results/V8SupportTestInterface.cpp
index d369c76da09b0402f55173c03fdcdb5e066a2120..502ac802f8f4b5fa432a8e9be0954e867d9f7d50 100644
--- a/Source/bindings/tests/results/V8SupportTestInterface.cpp
+++ b/Source/bindings/tests/results/V8SupportTestInterface.cpp
@@ -34,6 +34,7 @@
#include "V8SupportTestInterface.h"
#include "RuntimeEnabledFeatures.h"
+#include "V8Attr.h"
#include "V8Node.h"
#include "V8TestObject.h"
#include "bindings/tests/idls/testing/SupportTestPartialInterface.h"
@@ -42,6 +43,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"
@@ -223,6 +225,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);
SupportTestInterfaceV8Internal::supplementalNodeAttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -258,6 +262,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);
SupportTestInterfaceV8Internal::Node13AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -293,6 +299,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);
SupportTestInterfaceV8Internal::Node14AttributeSetter(jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestEventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698