Bug 1417442 - P1. Don't attempt to initialize MediaPrefs in the GPU process. r?dvander draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 16 Nov 2017 17:21:09 +0100
changeset 699102 f6bd463d73ec
parent 699017 92235deefc25
child 699103 d9f8808cd4ef
push id89468
push userbmo:jyavenard@mozilla.com
push dateThu, 16 Nov 2017 17:28:05 +0000
reviewersdvander
bugs1417442
milestone59.0a1
Bug 1417442 - P1. Don't attempt to initialize MediaPrefs in the GPU process. r?dvander MozReview-Commit-ID: 66766Tx8vgM
widget/GfxInfoBase.cpp
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -586,17 +586,20 @@ GfxInfoBase::~GfxInfoBase()
 {
 }
 
 nsresult
 GfxInfoBase::Init()
 {
   InitGfxDriverInfoShutdownObserver();
   gfxPrefs::GetSingleton();
-  MediaPrefs::GetSingleton();
+  if (!XRE_IsGPUProcess()) {
+    // MediaPrefs can't run in the GPU process.
+    MediaPrefs::GetSingleton();
+  }
 
   nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
   if (os) {
     os->AddObserver(this, "blocklist-data-gfxItems", true);
   }
 
   return NS_OK;
 }