Bug 1366808: Add telemetry probe for about:restartrequired page. r=jimm
☠☠ backed out by 5a326d6404a7 ☠ ☠
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Mon, 09 Apr 2018 20:16:38 -0400
changeset 779697 bf2262b6aca8650eb733e930e17886e3f3854d0c
parent 779696 1fc82af3a155bcfcb4744a8462b1698f4a19e81c
child 779698 e9bbfe8e4ba814418981f9df1b557bf9f7d54e15
push id105836
push userbmo:ato@sny.no
push dateTue, 10 Apr 2018 12:07:22 +0000
reviewersjimm
bugs1366808
milestone61.0a1
Bug 1366808: Add telemetry probe for about:restartrequired page. r=jimm
browser/modules/ContentCrashHandlers.jsm
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/histogram-whitelists.json
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -324,16 +324,22 @@ var TabCrashHandler = {
     let uri = browser.currentURI;
     let gBrowser = browser.ownerGlobal.gBrowser;
     let tab = gBrowser.getTabForBrowser(browser);
     // The restart required page is non-remote by default.
     gBrowser.updateBrowserRemoteness(browser, false);
 
     browser.docShell.displayLoadError(Cr.NS_ERROR_BUILDID_MISMATCH, uri, null);
     tab.setAttribute("crashed", true);
+
+    // Make sure to only count once even if there are multiple windows
+    // that will all show about:restartrequired.
+    if (this._crashedTabCount == 1) {
+      Services.telemetry.getHistogramById("FX_CONTENT_BUILDID_MISMATCH").add(1);
+    }
   },
 
   /**
    * We show a special page to users when a normal browser tab has crashed.
    * This method should be called to send a browser to that page once the
    * process has completely closed.
    *
    * @param browser (<xul:browser>)
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -12559,16 +12559,25 @@
     "record_in_processes": ["main", "content"],
     "alert_emails": ["wmccloskey@mozilla.com"],
     "bug_numbers": [1269961],
     "expires_in_version": "never",
     "kind": "count",
     "releaseChannelCollection": "opt-out",
     "description": "Counts the number of times that about:tabcrashed was unloaded without submitting."
   },
+  "FX_CONTENT_BUILDID_MISMATCH": {
+    "record_in_processes": ["main"],
+    "alert_emails": ["spohl@mozilla.com"],
+    "bug_numbers": [1366808],
+    "expires_in_version": "never",
+    "kind": "count",
+    "releaseChannelCollection": "opt-out",
+    "description": "Counts the number of times that about:restartrequired appeared."
+  },
    "D3D9_COMPOSITING_FAILURE_ID": {
     "record_in_processes": ["main", "content"],
        "alert_emails": ["gfx-telemetry-alerts@mozilla.com","msreckovic@mozilla.com"],
     "expires_in_version": "59",
     "kind": "count",
     "keyed": true,
     "description": "D3D9 compositor runtime and dynamic failure IDs. This will record a count for each context creation success or failure. Each failure id is a unique identifier that can be traced back to a particular failure branch or blocklist rule.",
     "bug_numbers": [1002846]
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -1631,16 +1631,17 @@
     "FENNEC_SYNC_NUMBER_OF_SYNCS_STARTED",
     "FENNEC_WAS_KILLED",
     "FIPS_ENABLED",
     "FXA_CONFIGURED",
     "FX_BROWSER_FULLSCREEN_USED",
     "FX_CONTENT_CRASH_DUMP_UNAVAILABLE",
     "FX_CONTENT_CRASH_NOT_SUBMITTED",
     "FX_CONTENT_CRASH_PRESENTED",
+    "FX_CONTENT_BUILDID_MISMATCH",
     "FX_SESSION_RESTORE_SEND_UPDATE_CAUSED_OOM",
     "FX_TOUCH_USED",
     "GEOLOCATION_ERROR",
     "MASTER_PASSWORD_ENABLED",
     "MEDIA_CODEC_USED",
     "NETWORK_CONNECTION_COUNT",
     "NUMBER_OF_PROFILES",
     "ONBEFOREUNLOAD_PROMPT_COUNT",