Commit Graph
689 Commits
Author SHA1 Message Date
Dave Townsend ff24c0c0b4 Bug 1901263: Support saving and loading the profile group ID in ClientID.sys.mjs. r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D214697
2024-07-29 09:46:18 +00:00
Norisz Fay e04c85aee4 Backed out 3 changesets (bug 1901263) for causing build bustages CLOSED TREE
Backed out changeset bf43d01b36bd (bug 1901263)
Backed out changeset be9a823b57b9 (bug 1901263)
Backed out changeset 2ab80f63edd5 (bug 1901263)
2024-07-26 00:25:20 +03:00
Dave Townsend 11ddbf6b83 Bug 1901263: Support saving and loading the profile group ID in ClientID.sys.mjs. r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D214697
2024-07-25 19:04:00 +00:00
Gijs Kruitbosch b690d00da5 Bug 1054947 - Also check prefs.js last modified time before showing profile reset notification after a long absence, r=mossop,firefox-desktop-core-reviewers ,mconley,glandium
Differential Revision: https://phabricator.services.mozilla.com/D212960
2024-06-14 22:35:40 +00:00
Mike Conley 4ab4f5e769 Bug 1883514 - Add nsIPrefService.backupPrefFile to asynchronously write prefs to a backup file. r=KrisWright
Instead of modifying SavePrefFile to do off-main-thread writing for
the non-nullptr case, I chose to create a new method dedicated to
writing to the non-default preference file for backing up. This
method will always use off-main-thread writing, unless the preference
service is configured to not allow that.

In either case, it'll return a Promise that resolves when the backup
file has been written.

This also fixes a bug where calling SavePrefFile with some nsIFile
wouldn't necessarily write to that file if there was a prior write
operation still being processed.

Differential Revision: https://phabricator.services.mozilla.com/D203832
2024-03-18 14:27:39 +00:00
Stephen A Pohl fb21d85a80 Bug 1799332: Add a macOS Framework to replace the use of channel-prefs.js on macOS. r=glandium,mstange,KrisWright,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D184711
2024-02-21 18:50:30 +00:00
Richard Cole 2253ea669c Bug 1845797 - Remove reload-default-prefs observer notification. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D199673
2024-01-29 18:22:26 +00:00
Tom Ritter 3ee9c6396e Bug 1873526: Refactor the restriction override list from a big if statement to a list r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D198081
2024-01-11 17:10:13 +00:00
Tom Ritter f6cf0c4fe7 Bug 1848829: Do not check pref sanitization for Static Prefs r=nika
If `IsPreferenceSanitized(char*)` is called, it will call pref_Lookup
which is not thread-safe.  StaticPrefs use that function to check
pref sanitization.

Prefs are sanitized if they are a no-default-value string-type preference
_or_ their name is in sRestrictFromWebContentProcesses. The first check
is intended to catch prefs set dynamically, ones we don't know about
and may want to sanitize. But Static Prefs we know all about. So we can
omit that check for them. We only (in theory) need to check them against
the blocklist.

In practice: no Static Prefs are sanitized.  If they were (and they were
not mirror-never prefs), it would have exposed the bug that makes content
processes crash on startup, because we would crash during initialization.

That initialization happens while reading the prefs from the Shared Map -
sanitized prefs can't be in the shared map. So we can take a shortcut and
instead of building in support for Static Prefs to be initialized from
the HashMap instead of the shared map (perhaps as simple as
s/GetSharedPrefValue/GetPrefValue), we can just crash if someone adds a
Static Pref to the list of things to be sanitized.

Differential Revision: https://phabricator.services.mozilla.com/D189968
2023-12-18 18:19:19 +00:00
Pier Angelo Vendrame 72c7391801 Bug 1860020 - Remove the assertion on the value of toolkit.telemetry.enabled. r=KrisWright,chutten
Bug 1444275 introduced an assertion on the parent process to check that
the value of toolkit.telemetry.enabled is the expected one.
However, this expected value could be different from the one set and
locked e.g. in some forks. Therefore, the assertion prevented debug
builds from working in these cases.

Differential Revision: https://phabricator.services.mozilla.com/D195080
2023-12-12 21:55:44 +00:00
Jens Stutte 7e95d16b1d Bug 1839051 - Remove include nsQuickSort.h from some more files. r=emilio
Depends on D182724

Differential Revision: https://phabricator.services.mozilla.com/D182731
2023-12-11 06:53:28 +00:00
Jens Stutte ab66beda3c Bug 1839051 - Use nsTArray::Sort for Sort and have also StableSort in nsCOMArray. r=necko-reviewers,kershaw,emilio,places-reviewers,mak
Depends on D181344

Differential Revision: https://phabricator.services.mozilla.com/D181889
2023-12-11 06:53:26 +00:00
Iulian Moraru 7a59e75c46 Backed out 8 changesets (bug 1839051) for causing assertion failures on NotificationController.cpp. CLOSED TREE
Backed out changeset 94a4c163e417 (bug 1839051)
Backed out changeset 5204b97e40bc (bug 1839051)
Backed out changeset 8443a22a399d (bug 1839051)
Backed out changeset 2ab1e27d5945 (bug 1839051)
Backed out changeset 20a850a4fd7e (bug 1839051)
Backed out changeset 658568fe9662 (bug 1839051)
Backed out changeset 82525b11a7c3 (bug 1839051)
Backed out changeset 720e6863c41a (bug 1839051)
2023-12-04 22:34:25 +02:00
Jens Stutte b612507fab Bug 1839051 - Remove include nsQuickSort.h from some more files. r=emilio
Depends on D182724

Differential Revision: https://phabricator.services.mozilla.com/D182731
2023-12-04 18:33:42 +00:00
Jens Stutte 924e499eb1 Bug 1839051 - Use nsTArray::Sort for Sort and have also StableSort in nsCOMArray. r=necko-reviewers,kershaw,emilio,places-reviewers,mak
Depends on D181344

Differential Revision: https://phabricator.services.mozilla.com/D181889
2023-12-04 18:33:40 +00:00
Mark Banner 49a88d8bb7 Bug 1844125 - Remove more bits of old translations code. r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D192154
2023-10-30 16:20:55 +00:00
Sylvestre Ledru e19d8da8b9 Bug 1856795 - ride along: use = default; on some recently modified files r=emilio
More on:
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

Command:
L=$(hg export -r tip|grep +++|cut -d/ -f2-)
./mach static-analysis check --checks="-*, modernize-use-equals-default" --fix $L

Differential Revision: https://phabricator.services.mozilla.com/D191016
2023-10-15 15:29:03 +00:00
Sylvestre Ledru b0fe72dee5 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 7388749830 Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru ba5da021b1 Bug 1856795 - ride along: use = default; on some recently modified files r=emilio
More on:
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

Command:
L=$(hg export -r tip|grep +++|cut -d/ -f2-)
./mach static-analysis check --checks="-*, modernize-use-equals-default" --fix $L

Differential Revision: https://phabricator.services.mozilla.com/D191016
2023-10-14 17:34:27 +00:00
Sylvestre Ledru 4a97019e39 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Emilio Cobos Álvarez d02e297b2d Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Jan Varga 272327b326 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
serge-sans-paille 59eeffffb2 Bug 1854478 - Improve constness of array of preferences r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D188884
2023-09-28 15:04:00 +00:00
Masatoshi Kimura e740f7ed25 Bug 1850247 - Add pref name to warning log. r=KrisWright
I could not have found the regressor without this.

Differential Revision: https://phabricator.services.mozilla.com/D186884
2023-08-31 16:58:12 +00:00
Stephen A Pohl 4593f6726f Bug 1815471: Remove support for special pref files. r=mkaply,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D169082
2023-08-02 15:54:03 +00:00
Morgan Rae Reschenberg efd4377b63 Bug 1844213: Add accessibility.tabfocus to the dynamic pref override list r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D184030
2023-07-24 19:42:45 +00:00
Tom Schuster 2454d6dc41 Bug 1843841 - Make navigator.appName constant. r=dom-worker-reviewers,webidl,smaug,timhuang
This is supposed to constant per https://html.spec.whatwg.org/#client-identification.

Differential Revision: https://phabricator.services.mozilla.com/D183723
2023-07-19 17:00:53 +00:00
Sebastian Hengst e2750a2917 Bug 1843197 - add some services.* prefs as not to be sanitized, as intended. r=tjr
The services.* preferences branch gets sanitizer by default. Exceptions
need to be added in the ShouldSanitizePreference method.

services.settings.loglevel got added in bug 1840851.
services.settings.preview_enabled got added in bug 1780403.

Differential Revision: https://phabricator.services.mozilla.com/D183442
2023-07-14 12:44:44 +00:00
Tom Ritter fdaf0cff33 Bug 1840851: Add a few prefs to the allowlist r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D182359
2023-06-30 13:48:54 +00:00
Marco Castelluccio 8093b2706a Bug 720419 - Remove nsIPrefBranch::ResetBranch. r=KrisWright
Make it so callers need to explicitly iterate through prefs using getChildList
when they want to reset an entire branch, to avoid the footgun of resetting
unintended prefs when using resetBranch for clearing a single pref.
See also https://phabricator.services.mozilla.com/D11381#357618.

Differential Revision: https://phabricator.services.mozilla.com/D180548
2023-06-12 18:01:25 +00:00
Mike Hommey 71e957fead Bug 1833676 - Disable thread safety analysis on InitStaticPrefsFromShared. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D178403
2023-05-23 21:55:25 +00:00
nicklas boman 4114a8d7f7 Bug 1724649 - Followup to remove #include plstr.h r=necko-reviewers,xpcom-reviewers,valentin,nika
Differential Revision: https://phabricator.services.mozilla.com/D177690
2023-05-15 14:53:02 +00:00
Daniel Holbert 101cfcaffe Bug 1826268: Use StaticAutoPtr to manage several global variables in Preferences.cpp. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D174558
2023-04-05 20:41:17 +00:00
Daniel Holbert 010aeffcca Bug 1826234: Fix GetObserverService error-handling check in Preferences::InitInitialObjects. r=xpcom-reviewers,emilio
In mozilla-central before this patch, we had a boilerplate
NS_ENSURE_SUCCESS(rv, rv) after our call to GetObserverService()

This expression *does not actually test whether GetObserverService() succeeded*
though, since GetObserverService doesn't touch rv!  When GetObserverService()
fails, it just returns nullptr.  So we should be testing it for success with a
null-check.

In fact, we did *used to* test for success with a null-check, but that was
replaced by this ineffective NS_ENSURE_SUCCESS by accident in Bug 1276488, as
part of a large patch that was geared at adding diagnostics.

So: let's just restore the null-check. It's unlikely to be tripped, since
GetObserverService only returns nullptr at xpcom shutdown time (and this code
runs at startup); but explicitly handling that by returning a failure code
seems to be the right thing to do.  And more importantly, the NS_ENSURE_SUCCESS
can be made to misfire if we happen to have a stray error code from some
earlier call remaining in 'rv'.

Differential Revision: https://phabricator.services.mozilla.com/D174544
2023-04-04 01:06:01 +00:00
Lata 0b8f41c034 Bug 1823612 - Remove usage of marionette.log.level from Log.sys.mjs. r=whimboo,webdriver-reviewers,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D173207
2023-03-29 15:21:16 +00:00
Andi-Bogdan Postelnicu 011e3fc2d9 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 11:35:33 +00:00
Stanca Serban 98c675ed3f Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu 5e0156c1e4 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 09:27:56 +00:00
Tom Ritter 80af8b4848 Bug 1815893: Add three more preferences to the allowlist r=freddyb
Depends on D171763

Differential Revision: https://phabricator.services.mozilla.com/D171767
2023-03-07 15:15:31 +00:00
Florian Quèze 411879f425 Bug 1817297 - Stop sending PreferenceUpdate IPC messages for sanitized preferences, r=florian,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D170115
2023-03-06 15:21:36 +00:00
Jan Horak 939151647f Bug 1170092 Load preferences from /etc/firefox/defaults/pref on Linux; r=mkaply
Preferences from /etc/firefox/defaults/pref overwrites preferences set in omni.jar
and firefox/defaults/pref. The code was used for flatpak and snap only, but it could
be used also for regular Linux builds.

Differential Revision: https://phabricator.services.mozilla.com/D168799
2023-03-02 14:41:56 +00:00
serge-sans-paille 179f18d76b Bug 1819821 - Make modules/libpref buildable outside of a unified build environment r=andi
Depends on D171427

Differential Revision: https://phabricator.services.mozilla.com/D171428
2023-03-02 07:44:31 +00:00
Marian-Vasile Laza b852b334b6 Backed out changeset d0d2fe421be4 (bug 1170092) for xpcshell failures on /test_autoconfig_custom_path.js. CLOSED TREE 2023-02-21 18:45:03 +02:00
Jan Horak 9abda37aa1 Bug 1170092 Load preferences from /etc/firefox/defaults/pref on Linux; r=mkaply
Preferences from /etc/firefox/defaults/pref overwrites preferences set in omni.jar
and firefox/defaults/pref. The code was used for flatpak and snap only, but it could
be used also for regular Linux builds.

Differential Revision: https://phabricator.services.mozilla.com/D168799
2023-02-21 14:12:42 +00:00
Florian Quèze 693c4e0871 Bug 1815438 - add Preference Write markers, r=canaltinova.
Depends on D169239

Differential Revision: https://phabricator.services.mozilla.com/D169240
2023-02-10 21:50:03 +00:00
Florian Quèze 9ea49c1f01 Bug 1815438 - remove the 'Preference Read' profiler feature and record these markers unconditionally, r=canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D169239
2023-02-10 21:50:02 +00:00
Tom Ritter 61e8321014 Bug 1815893: Allowlist two internationalization custom preferences r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D169499
2023-02-10 19:12:02 +00:00
Tom Ritter 0e776d7faf Bug 1811294: Roll out Pref Sanitization r=smaug
1. Ship the Sanitization (currently on in Nightly
     but without crashing) to the trains
2. Enabling crashing in Nightly

#1 will start omitting the preference values in
Content Processes. An affected user will have
their browser behave differently - it will be as
if the preference has no value. So for e.g. the
font preferences, their font customizations will
be gone. If they file a bug about this happening
and an engineer connects the problem to pref
sanitization we could debug the issue and maybe
understand it.

#2 will mean that an affected user (of which
there are currently none we think) will have a
content process crash when they access a
forbidden preference. The crash reason will
contain the name of the preference, and the
stack which would help us better understand
why we crashed.

Differential Revision: https://phabricator.services.mozilla.com/D167287
2023-02-06 19:15:23 +00:00
Daisuke Akatsuka 72aca246e7 Bug 1725045: Remove browser.urlbar.resultGroups pref. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D167889
2023-01-26 23:10:19 +00:00