Bug 1822157 - Glean crash pings sent by CrashManager may be sent on Android r=gsvelto

This avoids sending the Glean crash pings on android, while still sending
Telemetry pings as before.

Differential Revision: https://phabricator.services.mozilla.com/D172476
This commit is contained in:
Alex Franchuk 2023-03-15 14:30:56 +00:00
Родитель 474d257b52
Коммит ec1af0401e
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -4,6 +4,9 @@
"use strict";
const { AppConstants } = ChromeUtils.importESModule(
"resource://gre/modules/AppConstants.sys.mjs"
);
const { PromiseUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PromiseUtils.sys.mjs"
);
@ -757,7 +760,12 @@ CrashManager.prototype = Object.freeze({
// Filter the remaining annotations to remove privacy-sensitive ones
reportMeta = this._filterAnnotations(reportMeta);
this._submitGleanCrashPing(reason, type, date, reportMeta);
// Glean crash pings should not be sent on Android: they are handled
// separately in lib-crash for Fenix (and potentially other GeckoView
// users).
if (AppConstants.platform !== "android") {
this._submitGleanCrashPing(reason, type, date, reportMeta);
}
if (onlyGlean) {
return;