Bug 1397371 - Remove the telemetry for ensuring that documents and friends can never end up with an expanded principal; r=bholley
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 06 Sep 2017 14:05:02 -0400
changeset 428862 4d492424cba2d599feba617463c83ef616a17f09
parent 428861 89e526b3ec99f21c747eab839d832800884d5295
child 428863 58e5b2cc2d8d43a1aa199b9b7d5d908bc700b5e7
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1397371
milestone57.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 1397371 - Remove the telemetry for ensuring that documents and friends can never end up with an expanded principal; r=bholley
dom/base/nsNodeInfoManager.cpp
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/histogram-whitelists.json
--- a/dom/base/nsNodeInfoManager.cpp
+++ b/dom/base/nsNodeInfoManager.cpp
@@ -6,17 +6,16 @@
 
 /*
  * A class for handing out nodeinfos and ensuring sharing of them as needed.
  */
 
 #include "nsNodeInfoManager.h"
 
 #include "mozilla/DebugOnly.h"
-#include "mozilla/Telemetry.h"
 #include "mozilla/dom/NodeInfo.h"
 #include "mozilla/dom/NodeInfoInlines.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsIAtom.h"
 #include "nsIDocument.h"
 #include "nsIPrincipal.h"
 #include "nsIURI.h"
@@ -415,19 +414,16 @@ nsNodeInfoManager::SetDocumentPrincipal(
   mPrincipal = nullptr;
   if (!aPrincipal) {
     aPrincipal = mDefaultPrincipal;
   }
 
   NS_ASSERTION(aPrincipal, "Must have principal by this point!");
   MOZ_DIAGNOSTIC_ASSERT(!nsContentUtils::IsExpandedPrincipal(aPrincipal),
                         "Documents shouldn't have an expanded principal");
-  if (nsContentUtils::IsExpandedPrincipal(aPrincipal)) {
-    Telemetry::Accumulate(Telemetry::DOCUMENT_WITH_EXPANDED_PRINCIPAL, 1);
-  }
 
   mPrincipal = aPrincipal;
 }
 
 void
 nsNodeInfoManager::RemoveNodeInfo(NodeInfo *aNodeInfo)
 {
   NS_PRECONDITION(aNodeInfo, "Trying to remove null nodeinfo from manager!");
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -12878,24 +12878,16 @@
     "alert_emails": ["hkirschner@mozilla.com"],
     "bug_numbers": [1332511],
     "expires_in_version": "58",
     "kind": "exponential",
     "high": 50000,
     "n_buckets": 100,
     "description": "Time in milliseconds from the first non-blank paint to the creation time of the next click, key, mouse or scroll event per top-level content browsing context."
   },
-  "DOCUMENT_WITH_EXPANDED_PRINCIPAL": {
-    "record_in_processes": ["main", "content"],
-    "alert_emails": ["dev-platform@lists.mozilla.org"],
-    "bug_numbers": [1301123],
-    "expires_in_version": "58",
-    "kind": "count",
-    "description": "Number of documents encountered using an expanded principal."
-  },
   "CONTENT_PAINT_TIME": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["danderson@mozilla.com","gfx-telemetry-alerts@mozilla.com"],
     "bug_numbers": [1309442],
     "expires_in_version": "60",
     "kind": "exponential",
     "high": 1000,
     "n_buckets": 50,
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -1777,17 +1777,16 @@
     "DEVTOOLS_STYLEEDITOR_OPENED_COUNT",
     "DEVTOOLS_TILT_OPENED_COUNT",
     "DEVTOOLS_TOOLBOX_OPENED_COUNT",
     "DEVTOOLS_WEBAUDIOEDITOR_OPENED_COUNT",
     "DEVTOOLS_WEBCONSOLE_OPENED_COUNT",
     "DEVTOOLS_WEBIDE_IMPORT_PROJECT_COUNT",
     "DEVTOOLS_WEBIDE_NEW_PROJECT_COUNT",
     "DEVTOOLS_WEBIDE_OPENED_COUNT",
-    "DOCUMENT_WITH_EXPANDED_PRINCIPAL",
     "DOM_SCRIPT_SRC_ENCODING",
     "ENABLE_PRIVILEGE_EVER_CALLED",
     "FENNEC_DISTRIBUTION_REFERRER_INVALID",
     "FENNEC_ORBOT_INSTALLED",
     "FENNEC_RESTORING_ACTIVITY",
     "FENNEC_SESSIONSTORE_ALL_FILES_DAMAGED",
     "FENNEC_SESSIONSTORE_DAMAGED_SESSION_FILE",
     "FENNEC_SESSIONSTORE_RESTORING_FROM_BACKUP",