nsThread::mEventObservers doesn't get cleared at thread shutdown

RESOLVED FIXED in mozilla12

Status

()

Core
XPCOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

unspecified
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Once the thread manager shuts down, calls to NS_GetCurrentThread return null. So any consumers with registered observers (such as nsXPConnect) have no way to unregister themselves if their shutdown happens after ThreadManager shutdown. This can lead to cycles.

Ideally we'd unify the whole SetObserver vs AddObserver setup, but that's a task for another day.
Blocks: 716167
Created attachment 587920 [details] [diff] [review]
Bug 717498 - Clear nsThread::mEventObservers at thread shutdown. v1

Attaching a patch. Flagging bsmedberg for review.
Attachment #587920 - Flags: review?(benjamin)
Created attachment 587921 [details] [diff] [review]
Bug 717498 - Clear nsThread::mEventObservers at thread shutdown. v1

Err, that patch had slightly erroneous context due to its location in my patch stack. Here's a version rebased to mozilla-central.
Attachment #587920 - Attachment is obsolete: true
Attachment #587920 - Flags: review?(benjamin)
Attachment #587921 - Flags: review?(benjamin)

Updated

6 years ago
Attachment #587921 - Flags: review?(benjamin) → review+
Pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/3f65bc07bd89
Assignee: nobody → bobbyholley+bmo
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/3f65bc07bd89
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.