Bug 1205364 part 2. Back out the telemetry we added in bug 1175031. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 18 Sep 2015 13:36:29 -0400
changeset 295907 b5c142ca240b80d6ba072553de6d47ccd43d6d25
parent 295906 12981e43cd80998c97c72ac18abc8558ed7c0bd0
child 295908 28161d563685be3cafcc1a47dc08aed4dec67cdc
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1205364, 1175031
milestone43.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 1205364 part 2. Back out the telemetry we added in bug 1175031. r=smaug
dom/base/Attr.h
dom/base/nsDOMAttributeMap.cpp
toolkit/components/telemetry/Histograms.json
--- a/dom/base/Attr.h
+++ b/dom/base/Attr.h
@@ -93,18 +93,16 @@ public:
   bool Specified() const;
 
   // XPCOM GetNamespaceURI() is OK
   // XPCOM GetPrefix() is OK
   // XPCOM GetLocalName() is OK
 
   Element* GetOwnerElement(ErrorResult& aRv);
 
-  bool IsNSAware() const { return mNsAware; }
-
 protected:
   virtual Element* GetNameSpaceElement() override
   {
     return GetElement();
   }
 
   static bool sInitialized;
 
--- a/dom/base/nsDOMAttributeMap.cpp
+++ b/dom/base/nsDOMAttributeMap.cpp
@@ -10,17 +10,16 @@
 
 #include "nsDOMAttributeMap.h"
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/dom/Attr.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/NamedNodeMapBinding.h"
 #include "mozilla/dom/NodeInfoInlines.h"
-#include "mozilla/Telemetry.h"
 #include "nsAttrName.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "nsIContentInlines.h"
 #include "nsIDocument.h"
 #include "nsNameSpaceManager.h"
 #include "nsNodeInfoManager.h"
 #include "nsUnicharUtils.h"
@@ -267,31 +266,16 @@ nsDOMAttributeMap::SetNamedItemNS(nsIDOM
 
 already_AddRefed<Attr>
 nsDOMAttributeMap::SetNamedItemInternal(Attr& aAttr,
                                         bool aWithNS,
                                         ErrorResult& aError)
 {
   NS_ENSURE_TRUE(mContent, nullptr);
 
-  if (!aAttr.IsNSAware() &&
-      !mContent->IsHTMLElement() &&
-      aAttr.OwnerDoc()->IsHTMLDocument()) {
-    // Check whether we have a non-lowercase name, and if so log some telemetry.
-    // We check whether the attr's document is HTML _before_ the adopt we do
-    // below, because we're trying to figure out whether we could lowercase the
-    // attr name at creation time.  We restrict this to the !IsNSAware() case,
-    // because we only care about Attr nodes created via createAttribute.
-    nsIAtom* nameAtom = aAttr.NodeInfo()->NameAtom();
-    if (nsContentUtils::StringContainsASCIIUpper(nsDependentAtomString(nameAtom))) {
-        Telemetry::Accumulate(Telemetry::NONLOWERCASE_NONHTML_ATTR_NODE_SET,
-                              true);
-      }
-  }
-
   // XXX should check same-origin between mContent and aAttr however
   // nsContentUtils::CheckSameOrigin can't deal with attributenodes yet
 
   // Check that attribute is not owned by somebody else
   nsDOMAttributeMap* owner = aAttr.GetMap();
   if (owner) {
     if (owner != this) {
       aError.Throw(NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -8891,21 +8891,16 @@
   "GRAPHICS_SANITY_TEST_OS_SNAPSHOT": {
     "alert_emails": ["danderson@mozilla.com"],
     "expires_in_version": "never",
     "kind": "enumerated",
     "n_values": 10,
     "releaseChannelCollection": "opt-out",
     "description": "Reports whether the graphics sanity test passed an OS snapshot test. 0=Pass, 1=Fail, 2=Error, 3=Timed out."
   },
-  "NONLOWERCASE_NONHTML_ATTR_NODE_SET": {
-    "expires_in_version": "never",
-    "kind": "flag",
-    "description": "An Attr node that's not namespace-aware and was created from an HTML document is set on a non-HTML element and has a name containing uppercase ASCII chars"
-  },
   "DEVTOOLS_HUD_JANK": {
     "expires_in_version": "never",
     "kind": "exponential",
     "keyed": "true",
     "description": "The duration which a thread is blocked in ms, keyed by appName.",
     "high": "5000",
     "n_buckets": 10
   },