Closed Bug 183034 Opened 22 years ago Closed 19 years ago

Bad use of NS_ENSURE_TRUE in satchel causes spurious warning

Categories

(Toolkit :: Form Manager, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED EXPIRED

People

(Reporter: nate, Assigned: bugs)

References

()

Details

Attachments

(1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021128 Phoenix/0.4 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021128 Phoenix/0.4 In nsFormHistory::EntryExists there is a loop with two normal exit points. If the entry is found, the exit is silent and normal. If the entry is not found the loop exits via NS_ENSURE_TRUE(). Since this is a normal occurence, this produces a spurious warning (row != nsnull) and seems like bad practice. I'm submitting this as a bug because I was pursuing bug #181094, and it seemed to be correlated with this warning. As a result, I just wandered down a blind alley. Judging by the number of NS_ENSURE_TRUE warnings I get, there must be quite a few cases like this, but it would seem like knocking them off one by one would be a good thing. Reproducible: Always Steps to Reproduce: The easiest solution would be to change line 238 to "if (! row) break;", removing the use of NS_ENSURE_TRUE. This would be make it work like the loop similar loop at line 640. But this would still leave a misleading loop, as the loop would (still) never exit via the loop's test condition. The better solution would be change this loop to a for() or while() loop that actually uses the test condition. I'll happily submit a formal patch if that would be easier.
reassigning
Assignee: morse → form
Component: Form Manager → Layout: Form Controls
I'm running across this rather late, but if this code still exists, a formal patch and setting review request flags on it would help, yes.
satches is firefox specific
Assignee: core.layout.form-controls → bugs
Component: Layout: Form Controls → Form Manager
Product: Browser → Firefox
QA Contact: tpreston → firefox.form-manager
Nathan, assuming I'm looking in the right place, it looks like the change you suggested has been made: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/components/satchel/src/nsFormHistory.cpp&rev=1.24&mark=863-880#860 Can you take a look and close this bug if that's the case, thanks.
Attached file opps wrong bug lol (obsolete) —
Attachment #179137 - Attachment description: WARNING: this may crash windows if you have a set of video drivers that it effects. → WARNING: this may crash windows if you have a set of video drivers that it effects(press go to initiate).
Attachment #179137 - Attachment description: WARNING: this may crash windows if you have a set of video drivers that it effects(press go to initiate). → opps wrong bug lol
Attachment #179137 - Attachment is obsolete: true
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: