зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1922231 - Avoid recording to histograms or scalars in processes that don't match the probe definition, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D224309
This commit is contained in:
Родитель
fbae01d006
Коммит
1e85e4281a
|
@ -270,6 +270,11 @@ void PreferenceSheet::Initialize() {
|
|||
}
|
||||
}
|
||||
|
||||
// Telemetry for these preferences is only collected on the parent process.
|
||||
if (!XRE_IsParentProcess()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsAutoString useDocumentColorPref;
|
||||
switch (StaticPrefs::browser_display_document_color_use()) {
|
||||
case 1:
|
||||
|
|
|
@ -43,7 +43,11 @@ void StartupTimeline::RecordOnce(Event ev, const TimeStamp& aWhen) {
|
|||
|
||||
Record(ev, aWhen);
|
||||
|
||||
// Record first paint timestamp as a scalar.
|
||||
// Record first paint timestamp as a scalar in the parent process.
|
||||
if (!XRE_IsParentProcess()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ev == FIRST_PAINT || ev == FIRST_PAINT2) {
|
||||
uint32_t firstPaintTime =
|
||||
(uint32_t)(aWhen - TimeStamp::ProcessCreation()).ToMilliseconds();
|
||||
|
|
|
@ -305,7 +305,7 @@ void PreloaderBase::CancelUsageTimer() {
|
|||
}
|
||||
|
||||
void PreloaderBase::ReportUsageTelemetry() {
|
||||
if (mUsageTelementryReported) {
|
||||
if (mUsageTelementryReported || !XRE_IsContentProcess()) {
|
||||
return;
|
||||
}
|
||||
mUsageTelementryReported = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче