* Add a UIPhases / getUIPhase to figure out where we are in the flow, and get the UI into the right state
* Refactor to get rid of a bunch of implicit side-effects:
- Separate out getting the panel from creating it
- closePanel only closes the buttons panel
- Add a closeOverlay so we do that and only that when needed
* When the preview dialog closes, we expect to exit unless exitOnPreviewClose was set false
* Keep some state for each browser using a weakmap so we can better handle re-entry (and later, re-focusing)
Differential Revision: https://phabricator.services.mozilla.com/D185379
Until now we updated origins frecency using direct SQL triggers.
While that guaranteed good performance, it also had some downsides:
* replacing the algorithms is complicate, the current system only works
with a straight sum of page frecencies. We are planning to experiment with
different algorithms in the future.
* it requires using multiple temp tables and DELETE triggers, that is error
prone for consumers, that may forget to DELETE from the temp tables, and thus
break data coherency.
* there's not much atomicity, since the origins update must be triggered apart
and a crash would lose some of the changes
This patch is changing the behavior to be closer to the recalc_frecency one that
is already used for pages.
When a page is added, visited, or removed, recalc_frecency of its origin is set
to 1. Later frecency of invalidated origins will be recalculated in chunks.
While this is surely less efficient than the existing system, it solves the
problems presented above.
A threshold is recalculated at each chunk, and stored in the moz_meta table.
This patch continues using the old STATS in the moz_meta table, to allow for
easier downgrades. Once a new threshold will be introduced we'll be able to
stop updating those.
The after delete temp table is maintained because there's no more efficient way
to remove orphan origins promptly. Thus, after a removal from moz_places,
consumers MUST still DELETE from the temp table to cleanup orphan origins.
This also introduces a delayed removal of orphan origins when their frecency
becomes 0.
Differential Revision: https://phabricator.services.mozilla.com/D186070
To ensure Glean is always shut down, the FOG service must be initialized.
To ensure the FOG service is initialized, we cannot rely on BrowserGlue's
_scheduleStartupIdleTasks, since that isn't guaranteed to be called in short,
busy sessions.
So we rely on BrowserGlue's quit-application-granted listener
(which is before AppShutdownConfirmed, which is before XPCOMShutdown) so long
as BrowserGlue was ever init'd.
(We'd rely on __dispose instead, which runs around AppShutdown/profile-before-change,
but init'ing services that late sometimes prompts OOMs in xpchsell)
(This is important for catching early data in short, busy sessions.
In most cases this code shouldn't run)
Differential Revision: https://phabricator.services.mozilla.com/D181541
- Update the HTTPS-Only dropdown in the site identity pane to always set exceptions for the http version of the current origin.
- Add new parameter `forcedHTTP` to `gPermissionManager`, in order to only allow origins with a http scheme to be added in the HTTPS-Only section of the settings. This means when a https URL is added as an exeption, it will automatically be converted into a http one.
- Add a migration to convert all existing HTTPS-Only exceptions with a https scheme to a http scheme.
- Update `browser_https_only_exceptions.js` and `browser_identityPopup_HttpsOnlyMode.js` to account for this new behaviour.
Differential Revision: https://phabricator.services.mozilla.com/D182761
To ensure Glean is always shut down, the FOG service must be initialized.
To ensure the FOG service is initialized, we cannot rely on BrowserGlue's
_scheduleStartupIdleTasks, since that isn't guaranteed to be called in short,
busy sessions.
So we rely on BrowserGlue's quit-application-granted listener
(which is before AppShutdownConfirmed, which is before XPCOMShutdown) so long
as BrowserGlue was ever init'd.
(We'd rely on __dispose instead, which runs around AppShutdown/profile-before-change,
but init'ing services that late sometimes prompts OOMs in xpchsell)
(This is important for catching early data in short, busy sessions.
In most cases this code shouldn't run)
Differential Revision: https://phabricator.services.mozilla.com/D181541
Bug 1823537 moved the registration of the MigrationWizard JSWindowActor pair
into MigrationUtils from BrowserGlue. This makes it so that the wizard can
be used properly in the scenario where BrowserGlue hasn't yet had a chance
to run (which is the case when we're showing the migration wizard on startup).
This, however, means that the actors aren't being registered unless MigrationUtils
is loaded, which is no longer the case having moved the registration outside of
BrowserGlue.
This means that the embedded migration wizard in about:welcome (and the spotlight
experience in bug 1837051) will not work until that module loads and the
registration occurs.
Differential Revision: https://phabricator.services.mozilla.com/D180725
Bug 1823537 moved the registration of the MigrationWizard JSWindowActor pair
into MigrationUtils from BrowserGlue. This makes it so that the wizard can
be used properly in the scenario where BrowserGlue hasn't yet had a chance
to run (which is the case when we're showing the migration wizard on startup).
This, however, means that the actors aren't being registered unless MigrationUtils
is loaded, which is no longer the case having moved the registration outside of
BrowserGlue.
This means that the embedded migration wizard in about:welcome (and the spotlight
experience in bug 1837051) will not work until that module loads and the
registration occurs.
Differential Revision: https://phabricator.services.mozilla.com/D180725