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

Unified Diff: third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp

Issue 2772723002: Add detailed use counters for document.registerElement use. (Closed)
Patch Set: Bring patch to head. Created 3 years, 9 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/core/dom/custom/V0CustomElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
index e6cee541d9077db25e78785bf9401d68c4117e26..c1abb788028e24de5f934b9a31ebff2cb36d5de5 100644
--- a/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
@@ -38,6 +38,7 @@
#include "core/dom/custom/V0CustomElementMicrotaskRunQueue.h"
#include "core/dom/custom/V0CustomElementObserver.h"
#include "core/dom/custom/V0CustomElementScheduler.h"
+#include "core/frame/UseCounter.h"
namespace blink {
@@ -108,6 +109,11 @@ void V0CustomElement::define(Element* element,
break;
case Element::V0WaitingForUpgrade:
+ UseCounter::count(
+ element->document(),
+ definition->descriptor().isTypeExtension()
+ ? UseCounter::V0CustomElementsCreateTypeExtensionElement
+ : UseCounter::V0CustomElementsCreateCustomTagElement);
element->v0SetCustomElementDefinition(definition);
V0CustomElementScheduler::scheduleCallback(
definition->callbacks(), element,

Powered by Google App Engine
This is Rietveld 408576698