Closed
Bug 147469
Opened 24 years ago
Closed 18 years ago
nsAppShellService::Initialize violates contract when it calls mAppShell->Create(0, nsnull)
Categories
(Core Graveyard :: Cmd-line Features, defect)
Core Graveyard
Cmd-line Features
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: jonsmirl, Unassigned)
Details
Attachments
(1 file)
|
652 bytes,
patch
|
timeless
:
review+
|
Details | Diff | Splinter Review |
In nsAppShellService the AppShell params are hardcoded to null.
- rv = mAppShell->Create(0, nsnull);
+ int argc;
+ char ** argv;
+ aCmdLineService->GetArgc(&argc);
+ aCmdLineService->GetArgv(&argv);
+ rv = mAppShell->Create(&argc, argv);
if (NS_FAILED(rv))
goto done;
From nsIAppShell.idl
/**
* Creates an application shell
*/
void Create(inout int argc, inout string argv);
A better fix might be to move the code that initializes rv = cmdLineArgs-
>Initialize(argc, argv); out of main1() and into nsAppShellService::Initialize
();
at first i was going to say this wasn't a big deal
because http://lxr.mozilla.org/seamonkey/ident?i=GetArgc shows the relevant
bits are called eventually.
however, the contract says inout, so that we pass 0 is a contract violation.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Summary: nsAppShellService does not set up cmdline param for platform AppShell → nsAppShellService::Initialize violates contract when it calls mAppShell->Create(0, nsnull)
Attachment #85208 -
Flags: review+
Updated•19 years ago
|
Assignee: law → nobody
QA Contact: bugzilla
Comment 3•18 years ago
|
||
Obsolete code? If so, please close.
/be
Comment 4•18 years ago
|
||
Yup, dead code.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•