diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp index 700b380808..1911fbc053 100644 --- a/startupcache/StartupCache.cpp +++ b/startupcache/StartupCache.cpp @@ -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) diff --git a/startupcache/StartupCache.h b/startupcache/StartupCache.h index 2086bc3cff..677e44a317 100644 --- a/startupcache/StartupCache.h +++ b/startupcache/StartupCache.h @@ -217,7 +217,7 @@ class StartupCacheDebugOutputStream final class StartupCacheWrapper final : public nsIStartupCache { - ~StartupCacheWrapper() {} + ~StartupCacheWrapper(); NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSISTARTUPCACHE