Closed Bug 814738 Opened 13 years ago Closed 13 years ago

Modernize traversal of nsTObserverArrays

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: mccr8, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

These classes explicitly iterate over nsTObserverArrays: nsAccessiblePivot (mObservers) nsEventListenerManager (mListeners) nsGlobalWindow (mIdleObservers) As part of this, the ImplCycleCollectionTraverse for nsTObserverArray<T> needs to be converted to nsAutoTObserverArray<T, N>. I have a patch floating around for this, mangled in with some other changes. I found these by renaming nsAutoTObserverArray::ElementAt to something else, then looking for compile errors.
Attached patch clean it upSplinter Review
Attachment #684776 - Flags: review?(bugs)
Comment on attachment 684776 [details] [diff] [review] clean it up Make sure to push this to try. Do we not need templates for nsTObserverArray? Only for the Auto* ? Assuming this gets answered, r+ (I couldn't find cycle collected nsTObserverArrays, only Auto*)
Attachment #684776 - Flags: review?(bugs) → review+
Yeah, I did a Linux64 debug try run, and it was fine. https://tbpl.mozilla.org/?tree=Try&rev=0f0e2dbb1b4e I guess we just didn't have any nsTObserverArrays being CC-traversed. That would explain why a previous patch I had that broke the observe template for them still compiled.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: