зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366808: Add telemetry probe for about:restartrequired page. r=jimm,chutten
This commit is contained in:
Родитель
8d4b0ba4b7
Коммит
339982e013
|
@ -322,6 +322,12 @@ var TabCrashHandler = {
|
|||
|
||||
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.scalarAdd("dom.contentprocess.buildID_mismatch", 1);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,3 +50,4 @@ support-files =
|
|||
usageTelemetrySearchSuggestions.xml
|
||||
[browser_UsageTelemetry_content.js]
|
||||
[browser_UsageTelemetry_content_aboutHome.js]
|
||||
[browser_UsageTelemetry_content_aboutRestartRequired.js]
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
"use strict";
|
||||
|
||||
const SCALAR_BUILDID_MISMATCH = "dom.contentprocess.buildID_mismatch";
|
||||
|
||||
add_task(async function test_aboutRestartRequired() {
|
||||
let CrashHandlers = {};
|
||||
ChromeUtils.import("resource:///modules/ContentCrashHandlers.jsm",
|
||||
CrashHandlers);
|
||||
|
||||
// Let's reset the counts.
|
||||
Services.telemetry.clearScalars();
|
||||
|
||||
let scalars =
|
||||
getParentProcessScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT);
|
||||
|
||||
// Check preconditions
|
||||
is(scalars[SCALAR_BUILDID_MISMATCH], undefined,
|
||||
"Build ID mismatch count should be undefined");
|
||||
|
||||
// Simulate buildID mismatch
|
||||
CrashHandlers.TabCrashHandler._crashedTabCount = 1;
|
||||
CrashHandlers.TabCrashHandler.sendToRestartRequiredPage(
|
||||
gBrowser.selectedTab.linkedBrowser);
|
||||
|
||||
scalars =
|
||||
getParentProcessScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT);
|
||||
|
||||
is(scalars[SCALAR_BUILDID_MISMATCH], 1,
|
||||
"Build ID mismatch count should be 1.");
|
||||
});
|
|
@ -776,6 +776,20 @@ dom.contentprocess:
|
|||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
buildID_mismatch:
|
||||
bug_numbers:
|
||||
- 1366808
|
||||
description: >
|
||||
The number of times the about:restartrequired page appeared due to a
|
||||
buildID mismatch between the parent and the content processes.
|
||||
expires: never
|
||||
kind: uint
|
||||
notification_emails:
|
||||
- spohl@mozilla.com
|
||||
release_channel_collection: opt-out
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
devtools.toolbar.eyedropper:
|
||||
opened:
|
||||
bug_numbers:
|
||||
|
|
Загрузка…
Ссылка в новой задаче