diff --git a/content/html/content/src/TextTrackManager.cpp b/content/html/content/src/TextTrackManager.cpp index f454eae5f66e..3d208f0ae105 100644 --- a/content/html/content/src/TextTrackManager.cpp +++ b/content/html/content/src/TextTrackManager.cpp @@ -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) diff --git a/content/html/content/src/TextTrackManager.h b/content/html/content/src/TextTrackManager.h index bd7c3b23fe40..5a44dd1b5c0f 100644 --- a/content/html/content/src/TextTrackManager.h +++ b/content/html/content/src/TextTrackManager.h @@ -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 mMediaElement; private: // List of the TextTrackManager's owning HTMLMediaElement's TextTracks. nsRefPtr mTextTracks;