diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-12-11 23:17:50 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-12-11 23:17:50 +0100 |
commit | 4f7e431137caffc0c1cc8deee361893a7eabe70c (patch) | |
tree | a6144fcb03d3cb5a2a3fbd8dae5aaff27bf4f932 /dom/html/TextTrackManager.h | |
parent | 5639e1ddd291a4f492fbdf061408ab36ba79f008 (diff) | |
download | uxp-4f7e431137caffc0c1cc8deee361893a7eabe70c.tar.gz |
Clear weak pointers in VTT shutdown observers.
Diffstat (limited to 'dom/html/TextTrackManager.h')
-rw-r--r-- | dom/html/TextTrackManager.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dom/html/TextTrackManager.h b/dom/html/TextTrackManager.h index d20707346b..4ad1a57a74 100644 --- a/dom/html/TextTrackManager.h +++ b/dom/html/TextTrackManager.h @@ -170,11 +170,15 @@ private: { MOZ_ASSERT(NS_IsMainThread()); if (strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0) { - nsContentUtils::UnregisterShutdownObserver(this); - mManager->NotifyShutdown(); + if (mManager) { + mManager->NotifyShutdown(); + } + Unregister(); } return NS_OK; } + + void Unregister(); private: ~ShutdownObserverProxy() {}; |