From edd346a668603ac3ac205e1066477e035f0d478a Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Tue, 1 Apr 2014 08:37:13 -0400 Subject: [PATCH] Bug 989210 - Consistently make cycle collector to deal with TextTrackManager's member variables. r=reyre --- content/html/content/src/TextTrackManager.cpp | 2 +- content/html/content/src/TextTrackManager.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/content/html/content/src/TextTrackManager.cpp b/content/html/content/src/TextTrackManager.cpp index f454eae5f66..3d208f0ae10 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 bd7c3b23fe4..5a44dd1b5c0 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;