nsDirectoryService is not threadsafe even though it uses threadsafe AddRef/Release

NEW
Unassigned

Status

()

7 years ago
a year ago

People

(Reporter: bent.mozilla, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

nsDirectoryService is not threadsafe even though it uses threadsafe AddRef/Release. It accesses a hash table and JS components from whatever thread it is called on, and none of that is safe.
It probably had threadsafe AddRef/Release for use with XPCOM proxies.  We should kill that.

Comment 2

7 years ago
Yeah, we should refuse to make directory service *usable* on other threads with assertions. I'm not sure I care as much about the refcounting if there's code actually using some kind of hand-rolled proxy, although that really shouldn't be necessary.
You need to log in before you can comment on or make changes to this bug.