This is subject to the same issue as an earlier patch in this series -- the icon will be wrong briefly at first launch, before the code in `BrowserContentHandler.jsm` replaces the default icon with the correct one.
Differential Revision: https://phabricator.services.mozilla.com/D138601
This is done differently depending on whether the Private Browsing window is the initial one, or if it's a new window from a running application. In the former case, we're still not setting it up early enough -- the window will initially show up in one icon, and then switch to the other one after we've adjusted the AUMID.
Regardless, the fact that we're doing it for every new window appears to mean that other places that require it (such as GeckoChildProcessHost.cpp) will Do The Right Thing (because they'll pull the cached version that `GetAppUserModelID` finds).
This behind a pref for now both because of the issue noted above, as well as the fact that we're waiting on finalized branding for this.
Differential Revision: https://phabricator.services.mozilla.com/D138194
This is subject to the same issue as an earlier patch in this series -- the icon will be wrong briefly at first launch, before the code in `BrowserContentHandler.jsm` replaces the default icon with the correct one.
Differential Revision: https://phabricator.services.mozilla.com/D138601
This is done differently depending on whether the Private Browsing window is the initial one, or if it's a new window from a running application. In the former case, we're still not setting it up early enough -- the window will initially show up in one icon, and then switch to the other one after we've adjusted the AUMID.
Regardless, the fact that we're doing it for every new window appears to mean that other places that require it (such as GeckoChildProcessHost.cpp) will Do The Right Thing (because they'll pull the cached version that `GetAppUserModelID` finds).
This behind a pref for now both because of the issue noted above, as well as the fact that we're waiting on finalized branding for this.
Differential Revision: https://phabricator.services.mozilla.com/D138194
This is subject to the same issue as an earlier patch in this series -- the icon will be wrong briefly at first launch, before the code in `BrowserContentHandler.jsm` replaces the default icon with the correct one.
Differential Revision: https://phabricator.services.mozilla.com/D138601
This is done differently depending on whether the Private Browsing window is the initial one, or if it's a new window from a running application. In the former case, we're still not setting it up early enough -- the window will initially show up in one icon, and then switch to the other one after we've adjusted the AUMID.
Regardless, the fact that we're doing it for every new window appears to mean that other places that require it (such as GeckoChildProcessHost.cpp) will Do The Right Thing (because they'll pull the cached version that `GetAppUserModelID` finds).
This behind a pref for now both because of the issue noted above, as well as the fact that we're waiting on finalized branding for this.
Differential Revision: https://phabricator.services.mozilla.com/D138194
This is subject to the same issue as an earlier patch in this series -- the icon will be wrong briefly at first launch, before the code in `BrowserContentHandler.jsm` replaces the default icon with the correct one.
Differential Revision: https://phabricator.services.mozilla.com/D138601
This is done differently depending on whether the Private Browsing window is the initial one, or if it's a new window from a running application. In the former case, we're still not setting it up early enough -- the window will initially show up in one icon, and then switch to the other one after we've adjusted the AUMID.
Regardless, the fact that we're doing it for every new window appears to mean that other places that require it (such as GeckoChildProcessHost.cpp) will Do The Right Thing (because they'll pull the cached version that `GetAppUserModelID` finds).
This behind a pref for now both because of the issue noted above, as well as the fact that we're waiting on finalized branding for this.
Differential Revision: https://phabricator.services.mozilla.com/D138194
The `-osint` flag is used as the signal that Windows is invoking
Firefox to handle a file type or protocol. The `-osint` flag was
introduced in order to mitigate security breaches due to poor argument
quoting (by consumers invoking Firefox); to use it for this new
purpose, it must be preserved for downstream consumers to react to.
Alternately, some marker of the flag could be maintained. Since the
flag needs to transit through the launcher process, I've elected to
simply not strip it as we validate command lines, and to accommodate
it further downstream. (It looks like Thunderbird already
accommodates `-osint`: see
https://searchfox.org/comm-central/rev/3e8f926de9ea09945b237177eb6d489c70318f0e/mail/components/MessengerContentHandler.jsm#568.)
The telemetry in this patch achieves two purposes. The first is to
count the number of times Firefox is invoked to handle a registered
file type or protocol: for this, a new keyed uint scalar was added.
File types start with a ".", just like on Windows; protocols
(equivalently, the schemes used to identify them) do not start with a
".".
The second is to identify times when Firefox is launched (i.e., it was
not already running) to handle a registered file type or protocol.
This generalizes the existing `os.environment.launch_method`,
introducing `os.environment.launched_to_handle` and
`os.environment.invoked_to_handle` string scalars, which record the
file type or protocol.
The command line state `STATE_INITIAL_LAUNCH` is used to discriminate
launching from invoking.
Differential Revision: https://phabricator.services.mozilla.com/D132288
This will allow starting Firefox in the background, and on Windows will allow
closing the last browser window without killing the main process. There is no
plan for actually using this by default in Firefox proper, but it's needed for
some explorations.
There's more to this work that we'll need - this is just the first step. For
instance, we'll need a real way to actually kill firefox on Windows other than
through the task manager (we'll be putting something in the system tray to
allow this.)
The patch wasn't particularly large, so I didn't split out the rename of
MOZ_APP_SILENT_START to MOZ_APP_SILENT_RESTART - let me know if you'd like me
to do that though and I can.
Differential Revision: https://phabricator.services.mozilla.com/D124249
Modify the command line handler such that it does not open any window on the initial application launch when the MOZ_APP_SILENT_RESTART env value is set.
Depends on D123019
Differential Revision: https://phabricator.services.mozilla.com/D123020
Add new NimbusFeatures.upgradeDialog with fallback enabled pref. Remember if the browser just did a major uprgade and check other conditions for showing before other default browser messages.
Differential Revision: https://phabricator.services.mozilla.com/D111041
This patch does not make the necessary replacement in tests. Those changes will be made in a later patch in this stack.
Some additional, related changes are also made in this patch:
cleanupActiveUpdate is being replaced with cleanupDownloadingUpdate and cleanupReadyUpdate. The two new functions currently do very similar things, but separating them will allow us to have each function clean up the right update, once we fully support more than one update per session.
The old mechanism to add something to the update history was for it to be assigned to activeUpdate, and then to assign null to activeUpdate. We now need to assign active updates to be null without adding them to the history. As an example, we need to set downloadingUpdate to null when the download completes, but it shouldn't be added to the history at that point. To address this, an explicit addUpdateToHistory function has been added, and assigning null to either active update variable no longer moves the update to the update history.
Differential Revision: https://phabricator.services.mozilla.com/D92289
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.
This was done automatically with a new eslint rule that will be introduced in
the next commit. One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS. The rule will be disabled for that instance.
Differential Revision: https://phabricator.services.mozilla.com/D28073
We only run the main event loop if at least one window is open. There are various
cases where this doesn't happen, such as -silent. By the time we get there though
some components have started and require appropriate notifications to tell them
to shutdown safely. This patch sends the quit-application-granted and
quit-application notifications in the case that there were no windows open
and nsAppStartup::Quit hasn't already been called when we come to run the
event loop.
Differential Revision: https://phabricator.services.mozilla.com/D51736
FirstStartup provides an optional mechanism to run synchronous services
before the UI appears. This is intended to be called as a post-install
action from an installer, such as the Windows Stub Installer, to allow
for downloading critical data and performance tuning before the first
run of a new Firefox install.
Differential Revision: https://phabricator.services.mozilla.com/D43364
Running with -silent does not result in the quit application granted notification.
Without that notification, we have a deadlock in EnvironmentAddonBuilder where it blocks
beforeShutdown waiting on the XPIDatabase to load.
Differential Revision: https://phabricator.services.mozilla.com/D41877
Running with -silent does not result in the quit application granted notification.
Without that notification, we have a deadlock in EnvironmentAddonBuilder where it blocks
beforeShutdown waiting on the XPIDatabase to load.
Differential Revision: https://phabricator.services.mozilla.com/D41877
This code was added over 9 years ago per a request from Firefox UX but it has never been used.
This does not affect the What's New page.
Differential Revision: https://phabricator.services.mozilla.com/D32903
Removed FX_PREFERENCES_OPENED_VIA probe as it expired in 63.Origin parameter for openPreferences has also been removed.
Differential Revision: https://phabricator.services.mozilla.com/D26795