Bug 989210 - Consistently make cycle collector to deal with TextTrackManager's member variables. r=reyre

This commit is contained in:
Olli Pettay 2014-04-01 08:37:13 -04:00
parent 3c5aa92686
commit edd346a668
2 changed files with 2 additions and 5 deletions

View File

@ -73,7 +73,7 @@ CompareTextTracks::LessThan(TextTrack* aOne, TextTrack* aTwo) const
return true;
}
NS_IMPL_CYCLE_COLLECTION_3(TextTrackManager, mTextTracks,
NS_IMPL_CYCLE_COLLECTION_4(TextTrackManager, mMediaElement, mTextTracks,
mPendingTextTracks, mNewCues)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(TextTrackManager, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(TextTrackManager, Release)

View File

@ -89,10 +89,7 @@ public:
void PopulatePendingList();
// The HTMLMediaElement that this TextTrackManager manages the TextTracks of.
// This is a weak reference as the life time of TextTrackManager is dependent
// on the HTMLMediaElement, so it should not be trying to hold the
// HTMLMediaElement alive.
HTMLMediaElement* mMediaElement;
nsRefPtr<HTMLMediaElement> mMediaElement;
private:
// List of the TextTrackManager's owning HTMLMediaElement's TextTracks.
nsRefPtr<TextTrackList> mTextTracks;