Bug 1550422 - P1. Add GPU process selector to prefs module. r?spohl!,mattwoodrow! draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 08 May 2019 16:48:16 +1000
changeset 2008578 f91c0a5c31559e881691b4ea3d3dd3c0f60cebcb
parent 2008202 1ae707852b608ea77dc82c892f25e169cbc316b5
child 2008579 4aaceae2bcc4b079e5bd1a0ef33ce53e8b8f56d4
push id363925
push userjyavenard@mozilla.com
push dateSat, 18 May 2019 07:53:18 +0000
treeherdertry@5082cd581229 [default view] [failures only]
reviewersspohl
bugs1550422
milestone68.0a1
Bug 1550422 - P1. Add GPU process selector to prefs module. r?spohl!,mattwoodrow! Differential Revision: https://phabricator.services.mozilla.com/D30586
gfx/thebes/gfxPrefs.h
modules/libpref/components.conf
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -190,19 +190,16 @@ class gfxPrefs final {
   class TypedPref : public Pref {
    public:
     explicit TypedPref(T aValue) : mValue(aValue) {}
 
     void GetCachedValue(GfxPrefValue* aOutValue) const override {
       CopyPrefValue(&mValue, aOutValue);
     }
     void SetCachedValue(const GfxPrefValue& aOutValue) override {
-      // This is only used in non-XPCOM processes.
-      MOZ_ASSERT(!IsPrefsServiceAvailable());
-
       T newValue;
       CopyPrefValue(&aOutValue, &newValue);
 
       if (mValue != newValue) {
         mValue = newValue;
         FireChangeCallback();
       }
     }
--- a/modules/libpref/components.conf
+++ b/modules/libpref/components.conf
@@ -13,16 +13,16 @@ UnloadFunc = 'mozilla::UnloadPrefsModule
 Classes = [
     {
         'cid': '{91ca2441-050f-4f7c-9df8-75b40ea40156}',
         'contract_ids': ['@mozilla.org/preferences-service;1'],
         'singleton': True,
         'type': 'mozilla::Preferences',
         'headers': ['mozilla/Preferences.h'],
         'constructor': 'mozilla::Preferences::GetInstanceForService',
-        'processes': ProcessSelector.ALLOW_IN_RDD_AND_SOCKET_PROCESS,
+        'processes': ProcessSelector.ALLOW_IN_GPU_RDD_AND_SOCKET_PROCESS,
     },
     {
         'cid': '{064d9cee-1dd2-11b2-83e3-d25ab0193c26}',
         'contract_ids': ['@mozilla.org/pref-localizedstring;1'],
         'type': 'nsPrefLocalizedString',
     },
 ]