Clear gStartupCacheWrapper in the dtor.

This commit is contained in:
Pale Moon
2018-01-26 15:11:51 +01:00
committed by Roy Tam
parent 6270e85e97
commit 0bcd39a3fe
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -725,6 +725,12 @@ StartupCacheWrapper* StartupCacheWrapper::gStartupCacheWrapper = nullptr;
NS_IMPL_ISUPPORTS(StartupCacheWrapper, nsIStartupCache)
StartupCacheWrapper::~StartupCacheWrapper()
{
MOZ_ASSERT(gStartupCacheWrapper == this);
gStartupCacheWrapper = nullptr;
}
StartupCacheWrapper* StartupCacheWrapper::GetSingleton()
{
if (!gStartupCacheWrapper)
+1 -1
View File
@@ -217,7 +217,7 @@ class StartupCacheDebugOutputStream final
class StartupCacheWrapper final
: public nsIStartupCache
{
~StartupCacheWrapper() {}
~StartupCacheWrapper();
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSISTARTUPCACHE