API extension needed for getting Unsigned int preferences

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
13 years ago
11 months ago

People

(Reporter: philipp, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
Many preferences have no possible negative values, even when defaulted, and hence using an accessor that returns a negative value merely adds complexity and the possibility of missing/inadequate bounds checking.

It also means that the potential for coding mixing signed and unsigned variables being manipulated and/or compared is introduced (with the accompanying sign mismatches on comparisons).

Having an accessor/convenience function for unsigned values would simplify coding.
Assignee: mscott → prefs
Component: General → Preferences: Backend
Product: Thunderbird → Core
QA Contact: general
Version: 1.5 → Trunk
(Filter "spam" on 'prefs-nobody-20080612'.)
Assignee: prefs → nobody
QA Contact: prefs
QA Contact: preferences → preferences-backend
The Preferences class has uint getters/setters. nsIPrefBranch doesn't, but it's mostly used from JavaScript code, which doesn't have uints. So I think the current situation is good enough.
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.