diff options
Diffstat (limited to 'gfx/thebes')
-rw-r--r-- | gfx/thebes/gfxFT2FontList.cpp | 15 | ||||
-rw-r--r-- | gfx/thebes/gfxFT2FontList.h | 3 | ||||
-rw-r--r-- | gfx/thebes/gfxPlatform.cpp | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp index 8a652df0d..09c938a24 100644 --- a/gfx/thebes/gfxFT2FontList.cpp +++ b/gfx/thebes/gfxFT2FontList.cpp @@ -812,6 +812,15 @@ public: : mFontList(aFontList) { } + void Remove() + { + nsCOMPtr<nsIObserverService> obs = services::GetObserverService(); + if (obs) { + obs->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID); + } + mFontList = nullptr; + } + protected: virtual ~WillShutdownObserver() { } @@ -847,11 +856,7 @@ gfxFT2FontList::gfxFT2FontList() gfxFT2FontList::~gfxFT2FontList() { if (mObserver) { - nsCOMPtr<nsIObserverService> obs = services::GetObserverService(); - if (obs) { - obs->RemoveObserver(mObserver, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID); - } - mObserver = nullptr; + mObserver->Remove(); } } diff --git a/gfx/thebes/gfxFT2FontList.h b/gfx/thebes/gfxFT2FontList.h index 63187ba26..9fb566c15 100644 --- a/gfx/thebes/gfxFT2FontList.h +++ b/gfx/thebes/gfxFT2FontList.h @@ -19,6 +19,7 @@ using mozilla::dom::FontListEntry; class FontNameCache; typedef struct FT_FaceRec_* FT_Face; class nsZipArchive; +class WillShutdownObserver; class FT2FontEntry : public gfxFontEntry { @@ -194,7 +195,7 @@ private: mozilla::UniquePtr<FontNameCache> mFontNameCache; int64_t mJarModifiedTime; - nsCOMPtr<nsIObserver> mObserver; + RefPtr<WillShutdownObserver> mObserver; }; #endif /* GFX_FT2FONTLIST_H */ diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 65227a8a7..70ba2fe6a 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -131,8 +131,6 @@ class mozilla::gl::SkiaGLGlue : public GenericAtomicRefCounted { #include "SoftwareVsyncSource.h" #include "nscore.h" // for NS_FREE_PERMANENT_DATA #include "mozilla/dom/ContentChild.h" -#include "gfxVR.h" -#include "VRManagerChild.h" #include "mozilla/gfx/GPUParent.h" #include "prsystem.h" @@ -492,8 +490,6 @@ gfxPlatform::gfxPlatform() contentMask, BackendType::CAIRO); mTotalSystemMemory = PR_GetPhysicalMemorySize(); - - VRManager::ManagerInit(); } gfxPlatform* @@ -900,14 +896,12 @@ gfxPlatform::ShutdownLayersIPC() sLayersIPCIsUp = false; if (XRE_IsContentProcess()) { - gfx::VRManagerChild::ShutDown(); // cf bug 1215265. if (gfxPrefs::ChildProcessShutdown()) { layers::CompositorBridgeChild::ShutDown(); layers::ImageBridgeChild::ShutDown(); } } else if (XRE_IsParentProcess()) { - gfx::VRManagerChild::ShutDown(); layers::CompositorBridgeChild::ShutDown(); layers::ImageBridgeChild::ShutDown(); |