[Basilisk] Issue MoonchildProductions/GRE#3029 - Remove telemetry from FE

This commit is contained in:
Moonchild 2021-11-01 00:24:15 +00:00 committed by roytam1
commit 653cba3202
49 changed files with 17 additions and 1661 deletions

View file

@ -628,7 +628,6 @@ var SessionStorageListener = {
let size = this.estimateStorageSize(collected);
MessageQueue.push("telemetry", () => ({ FX_SESSION_RESTORE_DOM_STORAGE_SIZE_ESTIMATE_CHARS: size }));
if (size > Preferences.get("browser.sessionstore.dom_storage_limit", DOM_STORAGE_MAX_CHARS)) {
// Rather than keeping the old storage, which wouldn't match the rest
// of the state of the page, empty the storage. DOM storage will be
@ -800,37 +799,23 @@ var MessageQueue = {
let durationMs = Date.now();
let data = {};
let telemetry = {};
for (let [key, func] of this._data) {
let value = func();
if (key == "telemetry") {
for (let histogramId of Object.keys(value)) {
telemetry[histogramId] = value[histogramId];
}
} else if (value || (key != "storagechange" && key != "historychange")) {
if (value || (key != "storagechange" && key != "historychange")) {
data[key] = value;
}
}
this._data.clear();
durationMs = Date.now() - durationMs;
telemetry.FX_SESSION_RESTORE_CONTENT_COLLECT_DATA_LONGEST_OP_MS = durationMs;
try {
// Send all data to the parent process.
sendAsyncMessage("SessionStore:update", {
data, telemetry, flushID,
data, flushID,
isFinal: options.isFinal || false,
epoch: gCurrentEpoch
});
} catch (ex if ex && ex.result == Cr.NS_ERROR_OUT_OF_MEMORY) {
let telemetry = {
FX_SESSION_RESTORE_SEND_UPDATE_CAUSED_OOM: 1
};
sendAsyncMessage("SessionStore:error", {
telemetry
});
}
},
};