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

VERIFIED FIXED in mozilla0.9.8

Status

Core Graveyard
Profile: BackEnd
--
critical
VERIFIED FIXED
16 years ago
2 years ago

People

(Reporter: Conrad Carlen (not reading bugmail), Assigned: Conrad Carlen (not reading bugmail))

Tracking

Trunk
mozilla0.9.8
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
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.
(Assignee)

Comment 1

16 years ago
Created attachment 66122 [details] [diff] [review]
patch

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?
(Assignee)

Comment 2

16 years ago
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 3

16 years ago
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+

Comment 4

16 years ago
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.
(Assignee)

Comment 5

16 years ago
CC'ing alecf for sr=

Comment 6

16 years ago
Comment on attachment 66122 [details] [diff] [review]
patch

sr=alecf
Attachment #66122 - Flags: superreview+
(Assignee)

Comment 7

16 years ago
Checked into trunk - leaving open to get it into 0.9.8.

Comment 8

16 years ago
a=asa (on behalf of drivers) for checkin to the 0.9.8 branch
Keywords: mozilla0.9.8+
(Assignee)

Comment 9

16 years ago
Checked into branch.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 10

16 years ago
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.