Clear weak pointers in VTT shutdown observers.

This commit is contained in:
wolfbeast 2018-12-11 23:17:50 +01:00 committed by Roy Tam
commit bb5e286644
2 changed files with 14 additions and 3 deletions

View file

@ -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() {};