Closed Bug 271475 Opened 20 years ago Closed 20 years ago

nsINIParser::Init is noisy when given file doesn't exist

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: darin.moz, Assigned: darin.moz)

Details

Attachments

(1 file)

nsINIParser::Init is noisy when given file doesn't exist

Either we should eliminate the NS_ENSURE_ macro, or we should fix the callers to
check if the file exists before passing it to nsINIParser.

I think removing the NS_ENSURE_ macro is probably fine.

BTW, this warning is hit by the nsXREDirProvider when it is trying to populate
the various directory lists.  It tries to read components.ini from various
locations, but those files don't always exist.
Attached patch v1 patchSplinter Review
Attachment #166895 - Flags: first-review?(bsmedberg)
Comment on attachment 166895 [details] [diff] [review]
v1 patch

I guess this is ok. I wanted clients of this API to do an Exists() check, but I
suppose that's placing an unnecessary burden on the calling code.
Attachment #166895 - Flags: first-review?(bsmedberg) → first-review+
Well, I figured you intended not to have callers check Exists() since that's how
you coded things with your semi-single profile patch ;-)
ack.. i almost forgot about this patch.  fixed-on-trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Component: XRE Startup → Startup and Profile System
QA Contact: nobody → startup
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: