Bug 1417442 - P1. Don't attempt to initialize MediaPrefs in the GPU process. r=dvander, a=sledru
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 16 Nov 2017 17:21:09 +0100
changeset 442420 799f29114d74
parent 442419 a41f982ed3a7
child 442421 38cedabd74d2
push id8203
push userryanvm@gmail.com
push dateWed, 22 Nov 2017 21:05:02 +0000
treeherdermozilla-beta@d55f73f1c890 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander, sledru
bugs1417442
milestone58.0
Bug 1417442 - P1. Don't attempt to initialize MediaPrefs in the GPU process. r=dvander, a=sledru MozReview-Commit-ID: 66766Tx8vgM
widget/GfxInfoBase.cpp
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -587,17 +587,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;
 }