Closed Bug 380315 Opened 18 years ago Closed 7 years ago

Preferences lie about being threadsafe

Categories

(Core :: Preferences: Backend, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bzbarsky, Unassigned)

Details

Both nsPrefService and nsPrefBranch implement threadsafe addref/release... but something as simple as SetBoolPref is not threadsafe. I think we should change addref/release to not be threadsafe either, so we'll at least get asserts if people use these from off the main thread...
Flags: blocking1.9?
I believe that these use threadsafe addref/release because they are used from XPCOM proxies. I think we should add assertions to the appropriate methods to ensure they are called from the correct thread.
Sure. That makes sense.
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
(Filter "spam" on 'prefs-nobody-20080612'.)
Assignee: prefs → nobody
QA Contact: prefs
QA Contact: preferences → preferences-backend
libpref now has lots of assertions that things are happening on the main thread (or, in some cases, the Stylo traversal thread).
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.