Firefox is launched with duplicate -foreground argument

RESOLVED FIXED in Firefox 48

Status

()

Core
Widget: Cocoa
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: spohl, Assigned: spohl)

Tracking

Trunk
mozilla48
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
When the Firefox .app bundle is launched by double-clicking (or with the 'open' command in Terminal), the Firefox binary is launched with a duplicate -foreground argument. This is assumed to cause the following error in the error console (Tools > Web Developer > Error Console):
Timestamp: 1/9/13 2:49:37 PM
Error: Warning: unrecognized command line flag -foreground

Source File: file:///Users/Stephen/Documents/objdir-ff-release/dist/Nightly.app/Contents/MacOS/components/nsBrowserContentHandler.js
Line: 775

It can be verified that -foreground is passed twice to the binary by running the following command in Terminal:
ps -ax | grep firefox

The output will look similar to:
17309 ??         0:03.46 /Users/Stephen/Documents/objdir-ff-release/dist/Nightly.app/Contents/MacOS/firefox -foreground -foreground
17316 ttys000    0:00.00 grep firefox
(Assignee)

Comment 1

5 years ago
It turns out that manually launching the firefox binary with a single -foreground argument generates the same error in the error console. Should this argument be removed? I have yet to find the place where the .app bundle specifies the arguments for the firefox binary.
trying widget:Cocoa first, could be also Toolkit:Startup and profile system
Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
(Assignee)

Comment 4

2 years ago
Created attachment 8743660 [details] [diff] [review]
Patch

Suddenly remembered this while looking at |SetupMacCommandLine| tonight. Try run is underway.
Assignee: nobody → spohl.mozilla.bugs
Status: NEW → ASSIGNED
(Assignee)

Comment 5

2 years ago
Comment on attachment 8743660 [details] [diff] [review]
Patch

Review of attachment 8743660 [details] [diff] [review]:
-----------------------------------------------------------------

This avoids the duplicate "-foreground" argument.
Attachment #8743660 - Flags: review?(mstange)
Attachment #8743660 - Flags: review?(mstange) → review+
(Assignee)

Comment 6

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/5f5b4ff17b1de061558edcccd2c9e15106359a46
Bug 828704: Avoid duplicate -foreground argument when launching Firefox on OSX. r=mstange

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5f5b4ff17b1d
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.