tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 277143444995b7e65f9222e5eff8f6ea3fba7516
parent 1016d0a080948bd8d343b73e07f5b09f415319ee
Author: Alexandre Poirot <poirot.alex@gmail.com>
Date:   Tue, 18 Nov 2025 10:02:51 +0000

Bug 1994951 - [devtools] Also introduce Web Compat profiler preset on Fenix. r=canaltinova,android-reviewers,tcampbell

Differential Revision: https://phabricator.services.mozilla.com/D269240

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerStartDialogFragment.kt | 2++
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerUtils.kt | 15+++++++++++++++
Mmobile/android/fenix/app/src/main/res/values/static_strings.xml | 3+++
3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerStartDialogFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerStartDialogFragment.kt @@ -141,6 +141,7 @@ class ProfilerStartDialogFragment : AppCompatDialogFragment() { ProfilerSettings.Media -> stringResource(R.string.profiler_filter_media) ProfilerSettings.Networking -> stringResource(R.string.profiler_filter_networking) ProfilerSettings.Debug -> stringResource(R.string.profiler_filter_debug) + ProfilerSettings.WebCompat -> stringResource(R.string.profiler_filter_web_compat) } val settingDesc = when (setting) { ProfilerSettings.Firefox -> stringResource(R.string.profiler_filter_firefox_explain) @@ -148,6 +149,7 @@ class ProfilerStartDialogFragment : AppCompatDialogFragment() { ProfilerSettings.Media -> stringResource(R.string.profiler_filter_media_explain) ProfilerSettings.Networking -> stringResource(R.string.profiler_filter_networking_explain) ProfilerSettings.Debug -> stringResource(R.string.profiler_filter_debug_explain) + ProfilerSettings.WebCompat -> stringResource(R.string.profiler_filter_web_compat_explain) } ProfilerLabeledRadioButton( diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerUtils.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ProfilerUtils.kt @@ -114,6 +114,20 @@ private val debug_threads = arrayOf( "*", ) +private val web_compat_features = arrayOf( + "java", + "screenshots", + "js", + "stackwalk", + "nostacksampling", + "tracing", +) + +private val web_compat_threads = arrayOf( + "GeckoMain", + "DOM Worker", +) + /** * Profiler settings enum for grouping features and settings together */ @@ -123,6 +137,7 @@ enum class ProfilerSettings(val threads: Array<String>, val features: Array<Stri Media(media_threads, media_features), Networking(networking_threads, networking_features), Debug(debug_threads, debug_features), + WebCompat(web_compat_threads, web_compat_features), ; init { diff --git a/mobile/android/fenix/app/src/main/res/values/static_strings.xml b/mobile/android/fenix/app/src/main/res/values/static_strings.xml @@ -165,6 +165,9 @@ <string name="profiler_filter_networking_explain">Preset for investigating networking bugs in Firefox</string> <string name="profiler_filter_debug">Debug</string> <string name="profiler_filter_debug_explain">Preset for debugging. High overhead, do not use for performance work but use for focusing on understanding browser behavior.</string> + <string name="profiler_filter_web_compat">Web Compat</string> + <string name="profiler_filter_web_compat_explain">Recommended preset for debugging web compatibility issues in websites, rather than tracking performance.</string> + <string name="profiler_start_dialog_started">Profiler started</string> <string name="profiler_start_cancel">Cancel</string> <string name="profiler_gathering">Gathering the profile</string>