Bug 1509795 - Add UseCounter telemetry for Shadow DOM API; r=smaug
authorEdgar Chen <echen@mozilla.com>
Wed, 28 Nov 2018 15:11:38 +0000
changeset 505298 531d30645f389f8ab0502bf9d5f27fb6f820ce26
parent 505297 ed8f77cd2f9e0b81363085f6cc1dce6f41cffc14
child 505299 227e4c46623286b1968954e5bbaae940ad0805c5
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1509795
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509795 - Add UseCounter telemetry for Shadow DOM API; r=smaug Differential Revision: https://phabricator.services.mozilla.com/D13250
dom/base/UseCounters.conf
dom/webidl/Element.webidl
--- a/dom/base/UseCounters.conf
+++ b/dom/base/UseCounters.conf
@@ -130,8 +130,11 @@ method console.profileEnd
 // document.open information
 custom DocumentOpen calls document.open in a way that creates a new Window object
 custom DocumentOpenReplace calls document.open in a way that creates a new Window object and replaces the old history entry.
 
 custom FilteredCrossOriginIFrame cross-origin <iframe> within a CSS/SVG filter
 
 // Custom Elements
 method CustomElementRegistry.define
+
+// Shadow DOM
+method Element.attachShadow
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -230,17 +230,17 @@ partial interface Element {
 // https://dom.spec.whatwg.org/#dictdef-shadowrootinit
 dictionary ShadowRootInit {
   required ShadowRootMode mode;
 };
 
 // https://dom.spec.whatwg.org/#element
 partial interface Element {
   // Shadow DOM v1
-  [Throws]
+  [Throws, UseCounter]
   ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
   [BinaryName="shadowRootByMode"]
   readonly attribute ShadowRoot? shadowRoot;
 
   [Func="nsDocument::IsCallerChromeOrAddon", BinaryName="shadowRoot"]
   readonly attribute ShadowRoot? openOrClosedShadowRoot;
 
   [BinaryName="assignedSlotByMode"]