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 392403 d197e7c3b897
parent 392402 33e6825ee87d
child 392404 f1ce735006d8
push id55561
push userjyavenard@mozilla.com
push dateFri, 17 Nov 2017 14:43:19 +0000
treeherderautoland@be47971d367a [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;
 }