Also includes:
* feat: improve support for bootstrapped extensions
Added support for custom preference pages.
* fix: incorrect loading order for bootstrap loader
* fix: BootstrapLoader
(cherry picked from commit eb40811e464688c7d2fc58a4330272dde1ec7937)
Places frontend initialization is surprisingly complex, and disentangling it
from the rest of startup by moving it to its own file helps make some of the
logic a little more obvious, and makes unit-testing a bit easier.
This also removes BrowserGlue from the indirection mechanism used between
MigatorBase instances and Places, by switching to category-manager-based
invocation - this way, migrator code does not need to directly
call places code to tell it it's done, but we don't need BrowserGlue to play
messenger between them.
It would be nice to do the same thing for `places-init-complete` but
that is notified from C++ code so unfortunately that is not easily possible.
Differential Revision: https://phabricator.services.mozilla.com/D244428
There was some discussion on whether the XULStore data should be written back into Session Store or Prefs. My concern there is that since we no longer *write* to XULStore, there is a good chance that this data is outdated anyways, and we'd be overwriting data in other places that *are* up-to-date. My vote is to simply discard this data, it seems that users were already comfortable with clearing their xulstore.json, so it doesn't seem like an issue to do the same programmatically.
Differential Revision: https://phabricator.services.mozilla.com/D248476
Doing this helps with code organization and keeping related things together,
further shrinking the list of custom component-specific code in
BrowserGlue.sys.mjs .
Differential Revision: https://phabricator.services.mozilla.com/D244427
This almost-ever-growing list of items makes BrowserGlue hard to scan, and
moving it to its own file both makes it easier to find, test independently
(without reaching into BrowserGlue code), and lets us avoid loading it
entirely if we don't need to migrate anything.
Differential Revision: https://phabricator.services.mozilla.com/D244426
This isn't particularly big but it has lived in BrowserGlue for a surprisingly
long time, and doesn't really belong there. There wasn't a _great_ home for
this, so I created a new directory.
SitePermissions.sys.mjs and other bits probably want to live in this directory
too, but one thing at a time.
Differential Revision: https://phabricator.services.mozilla.com/D244424
What it says on the tin, really.
This mostly makes it easier to find this list due to naming, and helps contain
startup logic to BrowserGlue proper. A giant definition list of actors is not
really logic - if there weren't some `onPreferenceChanged` handlers, we could
consider moving it all to a yaml file or other mechanism and compile it in...
Differential Revision: https://phabricator.services.mozilla.com/D244423
This moves a handful of things to run slightly later, but primarily it makes
sure that the scheduling and conditions under which each bit of telemetry is
collected is clear and in one place, instead of spread around.
Differential Revision: https://phabricator.services.mozilla.com/D244421
This moves all startup telemetry gathering into a separate file, to prepare
for some minor scheduling changes and avoid all the direct dependencies from
BrowserGlue.sys.mjs.
Note that the status quo in terms of scheduling (which this patch is not
changing, and the next patch in the stack only changes a tiny bit) suggests that
some of the scheduling of this startup telemetry is... somewhat haphazard.
We may wish to invest in better primitives to both avoid data collection taking
valuable resources/time on startup, but also offer better guarantees that the
eventual collection contains the data we need. Especially the "best effort"
scheduled items currently do not satisfy the second criteria. Either way this
should be easier with all the relevant code in one place and scheduled in the
same way.
Differential Revision: https://phabricator.services.mozilla.com/D244420
Move the data upload pref check into each `sendReport` call instead of checking
only at startup. Also fixup various things in test_dap.js.
Differential Revision: https://phabricator.services.mozilla.com/D243247
Adds the integratedSidebar pref to the `shopping2023` Nimbus feature and separates the enabling prefs for the migrated Review Checker in the main sidebar and the Shopping sidebar.
- Updates `browser.shopping.experience2023.integratedSidebar` to be the only enabling pref for the migrated Review Checker sidebar.
- Prevents `browser.shopping.experience2023.enabled` from disabling the migrate sidebar and uses it as the pref for the ShoppingSidebar actors.
- Removes the `browser.shopping.experience2023.shoppingSidebar` pref as it is no longer needed.
- Updates any tests the used these prefs to the new use.
- Init's the two sidebar differently in `ShoppingUtils` based on the Nimbus prefs.
- Unset the `SidebarController._state.command` when a sidebar tool pref sets it to `visible=false` otherwise it will try to re-open when the sidebar is opened again.
Differential Revision: https://phabricator.services.mozilla.com/D242053
* Update sidebar.main.tools default values and include a migration
* Modify updateDefaultTools in SidebarManager
* Update tests
Differential Revision: https://phabricator.services.mozilla.com/D240903
There's no need to use weak reference while relying on something to keep the
prefs object alive.
Use plain prefs API with strong references.
Differential Revision: https://phabricator.services.mozilla.com/D240792
- add fetch in child process
- DOM parsing only once
- check content-type to be text/html before fetching content
- add custom request header x-firefox-ai so publisher has option to allow/disallow the fetch request
- more fetch safeguards(max content-length) may come in the near future
Differential Revision: https://phabricator.services.mozilla.com/D240654