Closed Bug 296394 Opened 19 years ago Closed 18 years ago

Firefox should not complain about -console command line argument

Categories

(Toolkit :: Startup and Profile System, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: ted, Assigned: mossop)

References

Details

(Keywords: verified1.8.1.2)

Attachments

(1 file, 1 obsolete file)

Firefox currently says "unknown command line argument -console" (printed on the
console, no less).  We should just ignore it.
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a2) Gecko/20060511 BonEcho/2.0a2] (nightly) (W98SE)

JS.Console output:
[[
Error: Warning: unrecognized command line flag -console

Source File: file:///P:/FIREFOX/components/nsBrowserContentHandler.js
Line: 520
]]

Yet, the (system) console do open corectly !
Component: General → Startup and Profile System
This also makes the -console parameter case insensitive for Windows which is the usual platform behavior - and requires just one special case (otherwise -Console would still be a valid flag for Windows but not for OS/2).
Assignee: nobody → zeniko
Status: NEW → ASSIGNED
Attachment #222954 - Flags: review?(benjamin)
QA Contact: general → startup
Comment on attachment 222954 [details] [diff] [review]
ignore the -console flag on Windows and OS/2

This is not the right place to put this code. If we're going to ignore it in the handler, it should go in a toolkit handler, like nsDefualtCLH.js

But I think that really the nativeappsupport code ought to remove the arg from the commandline at the time it is processed, e.g. at http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsNativeAppSupportWin.cpp#331 it should be removed from argv.
Attachment #222954 - Flags: review?(benjamin) → review-
(In reply to comment #3)
> This is not the right place to put this code. If we're going to ignore it in
> the handler, it should go in a toolkit handler, like nsDefualtCLH.js

Which isn't included neither with Firefox nor with Thunderbird. It's up to a C++ coder then.
Assignee: zeniko → nobody
Status: ASSIGNED → NEW
This patch removes the console argument from gArgv when it is processed.
Assignee: nobody → mossop.bugzilla
Attachment #222954 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #252218 - Flags: review?
Attachment #252218 - Flags: review? → review?(benjamin)
Attachment #252218 - Flags: review?(benjamin) → review+
Whiteboard: [checkin needed]
Flags: in-testsuite-
mozilla/toolkit/xre/nsNativeAppSupportWin.cpp 1.27
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Comment on attachment 252218 [details] [diff] [review]
Remove -console from gArgv

Not stability or security but it'd be nice to clean up this confusion for extension developers on the branch and I'd consider there to be essentially no risk here.
Attachment #252218 - Flags: approval1.8.1.2?
Comment on attachment 252218 [details] [diff] [review]
Remove -console from gArgv

a=dveditz for the 1.8 branch
Attachment #252218 - Flags: approval1.8.1.2? → approval1.8.1.2+
Whiteboard: needs landing on 1.8 branch
1.8 bracnh: mozilla/toolkit/xre/nsNativeAppSupportWin.cpp 1.20.4.3
Keywords: fixed1.8.1.2
Whiteboard: needs landing on 1.8 branch
Verified fixed on trunk, I can see the bug in a 2007-01-26 build (error in the js console), but not anymore in the 2007-01-28 build.
Also verified fixed, using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070207 BonEcho/2.0.0.2pre
Status: RESOLVED → VERIFIED
Confirming V.Fixed with
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2pre) Gecko/20070207 BonEcho/2.0.0.2pre] (nightly) (W2Ksp4)
and
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a3pre) Gecko/20070207 Minefield/3.0a3pre] (nightly) (W2Ksp4)
as "new reporter".
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.