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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: jonsmirl, Unassigned)

Details

Attachments

(1 file)

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+
Assignee: law → nobody
QA Contact: bugzilla
Obsolete code? If so, please close. /be
Yup, dead code.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: