Closed Bug 121431 Opened 23 years ago Closed 23 years ago

nsProfile::LoadDefaultProfileDir() returns error when it shouldn't

Categories

(Core Graveyard :: Profile: BackEnd, defect)

x86
All
defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.8

People

(Reporter: ccarlen, Assigned: ccarlen)

Details

Attachments

(1 file)

http://lxr.mozilla.org/mozilla/source/profile/src/nsProfile.cpp#620
If the profile is brand new, this will return failure because the pref is not
there. That failure propagates up and, in turbo mode, has the disasterous effect
of failing to create an initial window :-/ Patch coming up.
Attached patch patchSplinter Review
This code has been around for a while and I'm not sure why this didn't show up
before. Brian, it was changed to use nsIPrefBranch instead of the ole nsIPref.
Is it possible that nsIPref didn't return failure for a non-existant pref?
Since this is a turbo-killer, adding nsbeta1 and want to get it on 0.9.8 wagon.
Status: NEW → ASSIGNED
Keywords: nsbeta1
Target Milestone: --- → mozilla0.9.8
Comment on attachment 66122 [details] [diff] [review]
patch

No, prefs have always returned failure when the pref doesn't exist. Besides
which, nsIPref is just a wrapper which calls nsIPrefBranch... and has been for
some time. More likely is that the error handling was incorrectly added when
the code was converted from nsIPref -> nsIPrefBranch. r=bnesse on the patch.
Attachment #66122 - Flags: review+
Hmm, that's not it. I just looked at Chip's patch... the error handling was
there before the change to nsIPrefBranch. It would seem that it has been this
way for a long time.
CC'ing alecf for sr=
Comment on attachment 66122 [details] [diff] [review]
patch

sr=alecf
Attachment #66122 - Flags: superreview+
Checked into trunk - leaving open to get it into 0.9.8.
a=asa (on behalf of drivers) for checkin to the 0.9.8 branch
Keywords: mozilla0.9.8+
Checked into branch.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified code fix
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: