Bug 1935420 - rewrite JS code storing histograms in local variables to make automatic glean migration easier, r=chutten,fxview-reviewers,sync-reviewers,anti-tracking-reviewers,places-reviewers,markh,nsharpley.

Differential Revision: https://phabricator.services.mozilla.com/D234008
This commit is contained in:
Florian Quèze
2025-01-24 16:18:32 +00:00
parent eb2f90f870
commit 1ee252004d
16 changed files with 88 additions and 114 deletions

View File

@@ -285,10 +285,9 @@ let ShellServiceInternal = {
throw ex;
} finally {
try {
const histogram = Services.telemetry.getHistogramById(
"BROWSER_SET_DEFAULT_USER_CHOICE_RESULT"
);
histogram.add(telemetryResult);
Services.telemetry
.getHistogramById("BROWSER_SET_DEFAULT_USER_CHOICE_RESULT")
.add(telemetryResult);
} catch (ex) {}
}
},
@@ -320,10 +319,11 @@ let ShellServiceInternal = {
throw ex;
} finally {
try {
const histogram = Services.telemetry.getHistogramById(
"BROWSER_SET_DEFAULT_PDF_HANDLER_USER_CHOICE_RESULT"
);
histogram.add(telemetryResult);
Services.telemetry
.getHistogramById(
"BROWSER_SET_DEFAULT_PDF_HANDLER_USER_CHOICE_RESULT"
)
.add(telemetryResult);
} catch (ex) {}
}
},