Bug 1896030 - Don't open new window on -os-autostart if the application has already started. r=nalexander,firefox-desktop-core-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D210253
This commit is contained in:
Nicholas Rishel
2024-05-16 00:42:53 +00:00
parent da3770c18e
commit ffb727d232

View File

@@ -1130,6 +1130,14 @@ nsDefaultCommandLineHandler.prototype = {
var urilist = [];
var principalList = [];
if (
cmdLine.state != Ci.nsICommandLine.STATE_INITIAL_LAUNCH &&
cmdLine.findFlag("os-autostart", true) != -1
) {
// Relaunching after reboot (or quickly opening the application on reboot) and launch-on-login interact. If we see an after reboot command line while already running, ignore it.
return;
}
if (AppConstants.platform == "win") {
// Windows itself does disk I/O when the notification service is
// initialized, so make sure that is lazy.