summaryrefslogtreecommitdiffstats
path: root/dom/html/TextTrackManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/TextTrackManager.cpp')
-rw-r--r--dom/html/TextTrackManager.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/dom/html/TextTrackManager.cpp b/dom/html/TextTrackManager.cpp
index 4266575f7..7f9d32794 100644
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -29,6 +29,13 @@ namespace dom {
NS_IMPL_ISUPPORTS(TextTrackManager::ShutdownObserverProxy, nsIObserver);
+void
+TextTrackManager::ShutdownObserverProxy::Unregister()
+{
+ nsContentUtils::UnregisterShutdownObserver(this);
+ mManager = nullptr;
+}
+
CompareTextTracks::CompareTextTracks(HTMLMediaElement* aMediaElement)
{
mMediaElement = aMediaElement;
@@ -111,7 +118,6 @@ TextTrackManager::TextTrackManager(HTMLMediaElement *aMediaElement)
, mTimeMarchesOnDispatched(false)
, mUpdateCueDisplayDispatched(false)
, performedTrackSelection(false)
- , mCueTelemetryReported(false)
, mShutdown(false)
{
nsISupports* parentObject =
@@ -137,7 +143,7 @@ TextTrackManager::TextTrackManager(HTMLMediaElement *aMediaElement)
TextTrackManager::~TextTrackManager()
{
WEBVTT_LOG("%p ~TextTrackManager",this);
- nsContentUtils::UnregisterShutdownObserver(mShutdownProxy);
+ mShutdownProxy->Unregister();
}
TextTrackList*
@@ -163,7 +169,6 @@ TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel,
mTextTracks->AddTextTrack(aKind, aLabel, aLanguage, aMode, aReadyState,
aTextTrackSource, CompareTextTracks(mMediaElement));
AddCues(track);
- ReportTelemetryForTrack(track);
if (aTextTrackSource == TextTrackSource::Track) {
RefPtr<nsIRunnable> task =
@@ -183,7 +188,6 @@ TextTrackManager::AddTextTrack(TextTrack* aTextTrack)
WEBVTT_LOG("%p AddTextTrack TextTrack %p",this, aTextTrack);
mTextTracks->AddTextTrack(aTextTrack, CompareTextTracks(mMediaElement));
AddCues(aTextTrack);
- ReportTelemetryForTrack(aTextTrack);
if (aTextTrack->GetTextTrackSource() == TextTrackSource::Track) {
RefPtr<nsIRunnable> task =
@@ -302,7 +306,6 @@ TextTrackManager::NotifyCueAdded(TextTrackCue& aCue)
mNewCues->AddCue(aCue);
}
DispatchTimeMarchesOn();
- ReportTelemetryForCue();
}
void
@@ -820,17 +823,5 @@ TextTrackManager::NotifyReset()
mLastTimeMarchesOnCalled = 0.0;
}
-void
-TextTrackManager::ReportTelemetryForTrack(TextTrack* aTextTrack) const
-{
-/* STUB */
-}
-
-void
-TextTrackManager::ReportTelemetryForCue()
-{
-/* STUB */
-}
-
} // namespace dom
} // namespace mozilla