Bug 1716774 - Send correct telemetry for buildid mismatch false-positive r=gcp

Differential Revision: https://phabricator.services.mozilla.com/D118009
This commit is contained in:
Alexandre Lissy 2021-06-16 15:37:48 +00:00
parent 97adc8ac97
commit 859e2bdc3d
2 changed files with 10 additions and 13 deletions

View File

@ -87,8 +87,8 @@ add_task(async function test_browser_crashed_false_positive_event() {
is(
getFalsePositiveTelemetry(),
undefined,
"Build ID mismatch false positive count should be undefined"
1,
"Build ID mismatch false positive count should be 1"
);
});
@ -139,13 +139,13 @@ add_task(async function test_browser_restartrequired_event() {
is(
getFalsePositiveTelemetry(),
1,
"Build ID mismatch false positive count should be 1"
undefined,
"Build ID mismatch false positive count should be undefined"
);
});
add_task(async function test_browser_crashed_no_platform_ini_event() {
info("Waiting for oop-browser-crashed event.");
info("Waiting for oop-browser-buildid-mismatch event.");
Services.telemetry.clearScalars();
is(
@ -185,7 +185,7 @@ add_task(async function test_browser_crashed_no_platform_ini_event() {
is(
getFalsePositiveTelemetry(),
1,
"Build ID mismatch false positive count should be 1"
undefined,
"Build ID mismatch false positive count should be undefined"
);
});

View File

@ -3756,20 +3756,17 @@ void nsFrameLoader::MaybeNotifyCrashed(BrowsingContext* aBrowsingContext,
if (changedOrError.isErr()) {
NS_WARNING("Error while checking buildid mismatch");
eventName = u"oop-browser-buildid-mismatch"_ns;
#if defined(MOZ_TELEMETRY_REPORTING)
sendTelemetry = true;
#endif // defined(MOZ_TELEMETRY_REPORTING)
} else {
bool aChanged = changedOrError.unwrap();
if (aChanged) {
NS_WARNING("True build ID mismatch");
eventName = u"oop-browser-buildid-mismatch"_ns;
#if defined(MOZ_TELEMETRY_REPORTING)
sendTelemetry = true;
#endif // defined(MOZ_TELEMETRY_REPORTING)
} else {
NS_WARNING("build ID mismatch false alarm");
eventName = u"oop-browser-crashed"_ns;
#if defined(MOZ_TELEMETRY_REPORTING)
sendTelemetry = true;
#endif // defined(MOZ_TELEMETRY_REPORTING)
}
}
} else {