mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-20 13:40:24 +02:00
2b34aeea5d
Signed-off-by: Leah Rowe <leah@libreboot.org>
170 lines
6.3 KiB
Diff
170 lines
6.3 KiB
Diff
From 86537762694f63b6e4ce3c06c11444a726b08958 Mon Sep 17 00:00:00 2001
|
|
From: LibreWolf Developers <noreply@librewolf.net>
|
|
Date: Sun, 6 Sep 2026 10:09:43 +0100
|
|
Subject: [PATCH 10/52] disable-data-reporting-at-compile-time.patch
|
|
|
|
---
|
|
browser/components/tabbrowser/content/tabbrowser.js | 6 ------
|
|
browser/moz.configure | 4 ++--
|
|
python/mach/mach/telemetry.py | 5 +----
|
|
python/sites/mach.txt | 2 +-
|
|
third_party/rust/glean-core/src/core/mod.rs | 3 ++-
|
|
third_party/rust/glean-core/src/lib.rs | 3 +++
|
|
toolkit/components/telemetry/core/Telemetry.cpp | 6 +++---
|
|
toolkit/library/rust/gkrust-features.mozbuild | 2 +-
|
|
8 files changed, 13 insertions(+), 18 deletions(-)
|
|
|
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
|
index 43180487a2fa..b60919e238be 100644
|
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
|
@@ -3390,10 +3390,6 @@
|
|
);
|
|
}
|
|
|
|
- if (!UserInteraction.running("browser.tabs.opening", window)) {
|
|
- UserInteraction.start("browser.tabs.opening", "initting", window);
|
|
- }
|
|
-
|
|
// If we're opening a foreground tab, set the owner by default.
|
|
ownerTab ??= inBackground ? null : this.selectedTab;
|
|
|
|
@@ -4239,8 +4235,6 @@
|
|
0,
|
|
this.tabContainer
|
|
);
|
|
- } else {
|
|
- UserInteraction.update("browser.tabs.opening", "animated", window);
|
|
}
|
|
|
|
return t;
|
|
diff --git a/browser/moz.configure b/browser/moz.configure
|
|
index 3ea3d88b9360..c55951b8debf 100644
|
|
--- a/browser/moz.configure
|
|
+++ b/browser/moz.configure
|
|
@@ -3,11 +3,11 @@
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
imply_option("MOZ_PLACES", True)
|
|
-imply_option("MOZ_SERVICES_HEALTHREPORT", True)
|
|
+imply_option("MOZ_SERVICES_HEALTHREPORT", False)
|
|
imply_option("MOZ_SERVICES_SYNC", True)
|
|
imply_option("MOZ_DEDICATED_PROFILES", True)
|
|
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", True)
|
|
-imply_option("MOZ_NORMANDY", True)
|
|
+imply_option("MOZ_NORMANDY", False)
|
|
imply_option("MOZ_PROFILE_MIGRATOR", True)
|
|
|
|
|
|
diff --git a/python/mach/mach/telemetry.py b/python/mach/mach/telemetry.py
|
|
index 2b70b3f75a2d..b111dacc764e 100644
|
|
--- a/python/mach/mach/telemetry.py
|
|
+++ b/python/mach/mach/telemetry.py
|
|
@@ -82,10 +82,7 @@ def is_applicable_telemetry_environment():
|
|
|
|
|
|
def is_telemetry_enabled(settings):
|
|
- if os.environ.get("DISABLE_TELEMETRY") == "1":
|
|
- return False
|
|
-
|
|
- return settings.mach_telemetry.is_enabled
|
|
+ return False
|
|
|
|
|
|
def arcrc_path():
|
|
diff --git a/python/sites/mach.txt b/python/sites/mach.txt
|
|
index d5cdce88869a..f4f38c1f9b78 100644
|
|
--- a/python/sites/mach.txt
|
|
+++ b/python/sites/mach.txt
|
|
@@ -58,7 +58,7 @@ pth:xpcom/geckoprocesstypes_generator
|
|
pth:xpcom/idl-parser
|
|
# glean-sdk may not be installable if a wheel isn't available
|
|
# and it has to be built from source.
|
|
-pypi-optional:glean-sdk==68.0.1:telemetry will not be collected
|
|
+# pypi-optional:glean-sdk==68.0.1:telemetry will not be collected
|
|
pypi-optional:orjson>=3.10:json operations will be slower in various tools
|
|
# Mach gracefully handles the case where `psutil` is unavailable.
|
|
# We aren't (yet) able to pin packages in automation, so we have to
|
|
diff --git a/third_party/rust/glean-core/src/core/mod.rs b/third_party/rust/glean-core/src/core/mod.rs
|
|
index 013064660410..1f68b9ef3d4c 100644
|
|
--- a/third_party/rust/glean-core/src/core/mod.rs
|
|
+++ b/third_party/rust/glean-core/src/core/mod.rs
|
|
@@ -813,7 +813,8 @@ impl Glean {
|
|
///
|
|
/// When upload is disabled, no data will be recorded.
|
|
pub fn is_upload_enabled(&self) -> bool {
|
|
- self.upload_enabled
|
|
+ _ = self.upload_enabled;
|
|
+ false
|
|
}
|
|
|
|
/// Check if a ping is enabled.
|
|
diff --git a/third_party/rust/glean-core/src/lib.rs b/third_party/rust/glean-core/src/lib.rs
|
|
index c401c3dafef9..2a52db7d9f83 100644
|
|
--- a/third_party/rust/glean-core/src/lib.rs
|
|
+++ b/third_party/rust/glean-core/src/lib.rs
|
|
@@ -916,6 +916,7 @@ pub extern "C" fn glean_enable_logging() {
|
|
/// **DEPRECATION NOTICE**:
|
|
/// This API is deprecated. Use `set_collection_enabled` instead.
|
|
pub fn glean_set_upload_enabled(enabled: bool) {
|
|
+ let enabled = false;
|
|
if !was_initialize_called() {
|
|
return;
|
|
}
|
|
@@ -951,6 +952,8 @@ pub fn glean_set_upload_enabled(enabled: bool) {
|
|
///
|
|
/// This replaces `set_upload_enabled`.
|
|
pub fn glean_set_collection_enabled(enabled: bool) {
|
|
+ // Redundant currently
|
|
+ let enabled = false;
|
|
glean_set_upload_enabled(enabled)
|
|
}
|
|
|
|
diff --git a/toolkit/components/telemetry/core/Telemetry.cpp b/toolkit/components/telemetry/core/Telemetry.cpp
|
|
index 1e83d34cd007..474bc5c50bf3 100644
|
|
--- a/toolkit/components/telemetry/core/Telemetry.cpp
|
|
+++ b/toolkit/components/telemetry/core/Telemetry.cpp
|
|
@@ -693,7 +693,7 @@ TelemetryImpl::GetCanRecordBase(bool* ret) {
|
|
|
|
NS_IMETHODIMP
|
|
TelemetryImpl::SetCanRecordBase(bool canRecord) {
|
|
-#ifndef FUZZING
|
|
+#if false
|
|
if (canRecord != mCanRecordBase) {
|
|
TelemetryHistogram::SetCanRecordBase(canRecord);
|
|
TelemetryScalar::SetCanRecordBase(canRecord);
|
|
@@ -719,7 +719,7 @@ TelemetryImpl::GetCanRecordExtended(bool* ret) {
|
|
|
|
NS_IMETHODIMP
|
|
TelemetryImpl::SetCanRecordExtended(bool canRecord) {
|
|
-#ifndef FUZZING
|
|
+#if false
|
|
if (canRecord != mCanRecordExtended) {
|
|
TelemetryHistogram::SetCanRecordExtended(canRecord);
|
|
TelemetryScalar::SetCanRecordExtended(canRecord);
|
|
@@ -762,7 +762,7 @@ already_AddRefed<nsITelemetry> TelemetryImpl::CreateTelemetryInstance() {
|
|
}
|
|
|
|
bool useTelemetry = false;
|
|
-#ifndef FUZZING
|
|
+#if false
|
|
if (XRE_IsParentProcess() || XRE_IsContentProcess() || XRE_IsGPUProcess() ||
|
|
XRE_IsRDDProcess() || XRE_IsSocketProcess() || XRE_IsUtilityProcess()) {
|
|
useTelemetry = true;
|
|
diff --git a/toolkit/library/rust/gkrust-features.mozbuild b/toolkit/library/rust/gkrust-features.mozbuild
|
|
index 59535dd585aa..4d32a3062134 100644
|
|
--- a/toolkit/library/rust/gkrust-features.mozbuild
|
|
+++ b/toolkit/library/rust/gkrust-features.mozbuild
|
|
@@ -57,7 +57,7 @@ if CONFIG["MOZ_WEBRTC"]:
|
|
# We need to tell Glean it is being built with Gecko.
|
|
gkrust_features += ["glean_with_gecko"]
|
|
|
|
-if not CONFIG["MOZILLA_OFFICIAL"]:
|
|
+if CONFIG["MOZILLA_OFFICIAL"]:
|
|
gkrust_features += ["glean_disable_upload"]
|
|
|
|
if CONFIG["MOZ_ENABLE_DBUS"]:
|
|
--
|
|
2.47.3
|
|
|