Closed Bug 410746 Opened 17 years ago Closed 17 years ago

[FIX]NS_IMPL_AGGREGATED produces non-threadsafe addref/release that don't assert

Categories

(Core :: XPCOM, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

I ran into people using loadgroups on non-main threads...  The problem is that loadgroups use NS_IMPL_AGGREGATED, and the Internal::AddRef/Release methods this produces are most definitely not threadsafe, but don't NS_ASSERT_OWNINGTHREAD(), unlike NS_IMPL_ADDREF/RELEASE.

We should either make this refcounting threadsafe, or make it assert.
Flags: blocking1.9?
+ing because this is scary - bz who's a good person to take this?
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
That's a good question.

Let me try adding the relevant asserts and seeing whether we hit them much.  If we don't, I'll post the patch.  If we do, I'll just try making the refcounting threadsafe.

I do wonder why loadgroup and simple uri use this...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #295667 - Flags: superreview?(benjamin)
Attachment #295667 - Flags: review?(benjamin)
Summary: NS_IMPL_AGGREGATED produces non-threadsafe addref/release that don't assert → [FIX]NS_IMPL_AGGREGATED produces non-threadsafe addref/release that don't assert
Attachment #295667 - Flags: superreview?(benjamin)
Attachment #295667 - Flags: superreview+
Attachment #295667 - Flags: review?(benjamin)
Attachment #295667 - Flags: review+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: