Closed Bug 125881 Opened 23 years ago Closed 23 years ago

nsIProperties.Has() misbehaves for empty values

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: BenB, Assigned: BenB)

References

Details

Attachments

(1 file)

If you have a property with 0 as value (because you don't need it, just the existance of the property), Has returns false. This is broken. From old code: // XXX this is bogus because it doesn't distinguish between properties // defined with a value NULL, and undefined properties, but we'll fix // it later if it becomes a problem Would've been nice, if you told me in the interface :). (I was hunting that bug in my own code.) Will attach patch. Please review.
Attached patch Proposed fix, version 1 (deleted) — Splinter Review
Blocks: 108153
Keywords: patch, review
Target Milestone: --- → mozilla0.9.9
Comment on attachment 69846 [details] [diff] [review] Proposed fix, version 1 r=dougt
Attachment #69846 - Flags: review+
Comment on attachment 69846 [details] [diff] [review] Proposed fix, version 1 sr=jband
Attachment #69846 - Flags: superreview+
checked in. Thanks for the fast reviews! :-)
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
to reopen cf bug 138138.
I mean 'caused regression' not 'to reopen'. Can stay fixed as the other bug was created. NB: > "Thanks for the fast reviews! :-)" Too fast? ;)
I don't think so, see the other bug.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: