Closed Bug 370591 Opened 19 years ago Closed 19 years ago

Restrict history duration input with a formatter

Categories

(Camino Graveyard :: Preferences, defect)

x86
macOS
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)

Details

(Keywords: fixed1.8.1.5)

Attachments

(1 file, 1 obsolete file)

Attached patch fix (obsolete) — — Splinter Review
We should be using a formatter to restrict the history duration pref input to the characters we want, rather than allowing arbitrary input and then beeping if we don't like it.
Attachment #255310 - Flags: review?(stridey)
Since I'm in there, some more cleanup for kicks. I know I said I wouldn't do any more cleanup before 1.1, but I felt like writing this. It's not really risky since it's so self-contained, but it's also not likely to rot so I don't really care if it sits for a little while; your call.
Assignee: nobody → stuart.morgan
Attachment #255310 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #255313 - Flags: review?(stridey)
Attachment #255310 - Flags: review?(stridey)
Comment on attachment 255313 [details] [diff] [review] with more cleanup r=me, sorry about the wait.
Attachment #255313 - Flags: superreview?(mikepinkerton)
Attachment #255313 - Flags: review?(froodian)
Attachment #255313 - Flags: review+
Comment on attachment 255313 [details] [diff] [review] with more cleanup sr=pink + *anObject = [NSNumber numberWithInt:[string intValue]]; + return YES; what if |string| is something wonky and |-intValue| chokes and returns nil? Should we check |*anObject| for something valid before returning YES? Can intValue toss an exception?
Attachment #255313 - Flags: superreview?(mikepinkerton) → superreview+
(In reply to comment #3) > what if |string| is something wonky and |-intValue| chokes and returns nil? intValue returns an int, not a number object; if it can't find anything numeric at the beginning of the string it returns 0, which is fine here.
Checked in on trunk and MOZILLA_1_8_BRANCH
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1.5
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: