Bug 1953884 made the storeID pref always set and used the presence of storeID in profiles.ini to
determine whether profiles had previously been created. However it missed the startup code in
nsToolkitProfileService which always sets the storeID in profiles.ini if there is one set in prefs.
This means that users who had never used the profiles feature had the profiles created pref set to
true but no entry for the current profile was added to the database. This causes bustage when we
attempt to display various parts of the UI.
This adds a check to a point in startup when we know we should have found an entry for the current
profile in the database. If one doesn't exist we either create one if there are other profiles in
the database or we reset the prefs and profiles.ini to what they should look like if no profiles
have ever been created.
This should also resolve bug 1943559.
Differential Revision: https://phabricator.services.mozilla.com/D246775
Adds an API to nsIMacDockSupport to allow launching an application bundle and hiding it from the
list of recent applications.
Differential Revision: https://phabricator.services.mozilla.com/D238206
Adds an API to nsIMacDockSupport to allow launching an application bundle and hiding it from the
list of recent applications.
Differential Revision: https://phabricator.services.mozilla.com/D238206
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.
Differential Revision: https://phabricator.services.mozilla.com/D236848
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.
Differential Revision: https://phabricator.services.mozilla.com/D236848
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.
Differential Revision: https://phabricator.services.mozilla.com/D236848
Unlike other platforms on macOS if Firefox is already running and an application wants to open a URL
it doesn't use a command line call. Instead the URLs are passed via the NSApplicationDelegate
instance, our implementation of that creates a new nsICommandLine and runs it through the existing
handlers. This entirely skips the startup logic for choosing the default profile and so URLs are
simply opened in whatever profile happens to be running. Not sure what the precise logic is when
multiple profiles are running, it seems like the oldest one wins, not the most recently used one
which is what we want.
Here we intercept the new command line, attempt to guess if we may need to send it to a different
profile and if so do so by using the normal command line approach which will then use the startup
logic to choose the correct profile to use.
One niggle to this is that macOS also automatically focuses the existing instance of Firefox prior
to sending us the URLs which causes us to immediately switch the default profile. This patch
introduces a delay to that so we process the URLs before the default profile can change.
Differential Revision: https://phabricator.services.mozilla.com/D237221
Unlike other platforms on macOS if Firefox is already running and an application wants to open a URL
it doesn't use a command line call. Instead the URLs are passed via the NSApplicationDelegate
instance, our implementation of that creates a new nsICommandLine and runs it through the existing
handlers. This entirely skips the startup logic for choosing the default profile and so URLs are
simply opened in whatever profile happens to be running. Not sure what the precise logic is when
multiple profiles are running, it seems like the oldest one wins, not the most recently used one
which is what we want.
Here we intercept the new command line, attempt to guess if we may need to send it to a different
profile and if so do so by using the normal command line approach which will then use the startup
logic to choose the correct profile to use.
One niggle to this is that macOS also automatically focuses the existing instance of Firefox prior
to sending us the URLs which causes us to immediately switch the default profile. This patch
introduces a delay to that so we process the URLs before the default profile can change.
Differential Revision: https://phabricator.services.mozilla.com/D237221
This also ensures we are more consistent about using the state of `SelectableProfileService.isEnabled` to check if the feature is enabled.
Differential Revision: https://phabricator.services.mozilla.com/D236848
We set the current profile as default whenever a window activates, but we don't add that listener
until after the first window has activated so the default remains the previous profile until you
change window focus. This always sets the default immediately on startup.
Differential Revision: https://phabricator.services.mozilla.com/D234670