Bug 1442700 : Label added to TELEMETRY_SEND_FAILURE_TYPE and TelemetrySend's XHR_ERROR_TYPE for eTerminated , r?chutten
MozReview-Commit-ID: 50UaVrebTcm
--- a/dom/xhr/XMLHttpRequestMainThread.h
+++ b/dom/xhr/XMLHttpRequestMainThread.h
@@ -180,16 +180,18 @@ public:
error,
abort,
timeout,
load,
loadend,
ENUM_MAX
};
+ // Make sure that any additions done to ErrorType enum are also mirrored in
+ // XHR_ERROR_TYPE enum of TelemetrySend.jsm.
enum class ErrorType : uint16_t {
eOK,
eRequest,
eUnreachable,
eChannelOpen,
eRedirect,
eTerminated,
ENUM_MAX
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -7236,16 +7236,17 @@
"bug_numbers": [1367110],
"expires_in_version": "66",
"kind": "categorical",
"labels": [
"eOK",
"eRequest",
"eUnreachable",
"eChannelOpen",
+ "eTerminated",
"eRedirect",
"abort",
"timeout",
"eTooLate"
],
"description": "Counts of the different ways sending a Telemetry ping can fail."
},
"TELEMETRY_STRINGIFY" : {
--- a/toolkit/components/telemetry/TelemetrySend.jsm
+++ b/toolkit/components/telemetry/TelemetrySend.jsm
@@ -84,21 +84,24 @@ const SEND_TICK_DELAY = 1 * MS_IN_A_MINU
// This exponential backoff will be reset by external ping submissions & idle-daily.
const SEND_MAXIMUM_BACKOFF_DELAY_MS = 120 * MS_IN_A_MINUTE;
// The age of a pending ping to be considered overdue (in milliseconds).
const OVERDUE_PING_FILE_AGE = 7 * 24 * 60 * MS_IN_A_MINUTE; // 1 week
// Strings to map from XHR.errorCode to TELEMETRY_SEND_FAILURE_TYPE.
// Echoes XMLHttpRequestMainThread's ErrorType enum.
+// Make sure that any additions done to XHR_ERROR_TYPE enum are also mirrored in
+// TELEMETRY_SEND_FAILURE_TYPE's labels.
const XHR_ERROR_TYPE = [
"eOK",
"eRequest",
"eUnreachable",
"eChannelOpen",
+ "eTerminated",
"eRedirect",
];
/**
* This is a policy object used to override behavior within this module.
* Tests override properties on this object to allow for control of behavior
* that would otherwise be very hard to cover.
*/