Bug 1417442 - P1. Don't attempt to initialize MediaPrefs in the GPU process. r=dvander
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 16 Nov 2017 17:21:09 +0100
changeset 392390 d197e7c3b897
parent 392389 33e6825ee87d
child 392391 f1ce735006d8
push id32920
push usernerli@mozilla.com
push dateFri, 17 Nov 2017 22:01:05 +0000
treeherdermozilla-central@7ef46e350289 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1417442
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;
 }