summaryrefslogtreecommitdiffstats
path: root/dom/html/TextTrackManager.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-12-11 23:17:50 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-12-11 23:17:50 +0100
commit4f7e431137caffc0c1cc8deee361893a7eabe70c (patch)
treea6144fcb03d3cb5a2a3fbd8dae5aaff27bf4f932 /dom/html/TextTrackManager.cpp
parent5639e1ddd291a4f492fbdf061408ab36ba79f008 (diff)
downloadUXP-4f7e431137caffc0c1cc8deee361893a7eabe70c.tar
UXP-4f7e431137caffc0c1cc8deee361893a7eabe70c.tar.gz
UXP-4f7e431137caffc0c1cc8deee361893a7eabe70c.tar.lz
UXP-4f7e431137caffc0c1cc8deee361893a7eabe70c.tar.xz
UXP-4f7e431137caffc0c1cc8deee361893a7eabe70c.zip
Clear weak pointers in VTT shutdown observers.
Diffstat (limited to 'dom/html/TextTrackManager.cpp')
-rw-r--r--dom/html/TextTrackManager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/dom/html/TextTrackManager.cpp b/dom/html/TextTrackManager.cpp
index 4266575f7..cc14858b6 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;
@@ -137,7 +144,7 @@ TextTrackManager::TextTrackManager(HTMLMediaElement *aMediaElement)
TextTrackManager::~TextTrackManager()
{
WEBVTT_LOG("%p ~TextTrackManager",this);
- nsContentUtils::UnregisterShutdownObserver(mShutdownProxy);
+ mShutdownProxy->Unregister();
}
TextTrackList*