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
Родитель cdb03c60fa
Коммит 1350c8222e
2 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -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;