backout a9139003abaf for busting mobile
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 20 Feb 2015 14:06:56 -0800
changeset 257193 d5cf77595febb40614cc5e42b9d4d4f0c8ea2932
parent 257192 980ed27ef3e3895f9a239c0849df84ce7b9c8d36
child 257194 45a77b0aba15aa6afe238a2cfaee09c5578537cd
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone38.0a1
backs outa9139003abaff3d919f36b7e6ca5bc7ce114d31a
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
backout a9139003abaf for busting mobile
browser/modules/ReaderParent.jsm
toolkit/components/reader/AboutReader.jsm
--- a/browser/modules/ReaderParent.jsm
+++ b/browser/modules/ReaderParent.jsm
@@ -23,18 +23,16 @@ let ReaderParent = {
     "Reader:AddToList",
     "Reader:ArticleGet",
     "Reader:FaviconRequest",
     "Reader:ListStatusRequest",
     "Reader:RemoveFromList",
     "Reader:Share",
     "Reader:SystemUIVisibility",
     "Reader:UpdateReaderButton",
-    "Reader:SetIntPref",
-    "Reader:SetCharPref",
   ],
 
   init: function() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     for (let msg of this.MESSAGES) {
       mm.addMessageListener(msg, this);
     }
   },
@@ -77,28 +75,16 @@ let ReaderParent = {
       case "Reader:UpdateReaderButton": {
         let browser = message.target;
         if (message.data && message.data.isArticle !== undefined) {
           browser.isArticle = message.data.isArticle;
         }
         this.updateReaderButton(browser);
         break;
       }
-      case "Reader:SetIntPref": {
-        if (message.data && message.data.name !== undefined) {
-          Services.prefs.setIntPref(message.data.name, message.data.value);
-        }
-        break;
-      }
-      case "Reader:SetCharPref": {
-        if (message.data && message.data.name !== undefined) {
-          Services.prefs.setCharPref(message.data.name, message.data.value);
-        }
-        break;
-      }
     }
   },
 
   updateReaderButton: function(browser) {
     let win = browser.ownerDocument.defaultView;
     if (browser != win.gBrowser.selectedBrowser) {
       return;
     }
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -296,20 +296,17 @@ AboutReader.prototype = {
     let htmlClasses = this._doc.documentElement.classList;
 
     if (this._fontSize > 0)
       htmlClasses.remove("font-size" + this._fontSize);
 
     this._fontSize = newFontSize;
     htmlClasses.add("font-size" + this._fontSize);
 
-    this._mm.sendAsyncMessage("Reader:SetIntPref", {
-      name: "reader.font_size",
-      value: this._fontSize
-    });
+    Services.prefs.setIntPref("reader.font_size", this._fontSize);
   },
 
   _handleDeviceLight: function Reader_handleDeviceLight(newLux) {
     // Desired size of the this._luxValues array.
     let luxValuesSize = 10;
     // Add new lux value at the front of the array.
     this._luxValues.unshift(newLux);
     // Add new lux value to this._totalLux for averaging later.
@@ -390,38 +387,32 @@ AboutReader.prototype = {
   },
 
   // Pref values include "dark", "light", and "auto", which automatically switches
   // between light and dark color schemes based on the ambient light level.
   _setColorSchemePref: function Reader_setColorSchemePref(colorSchemePref) {
     this._enableAmbientLighting(colorSchemePref === "auto");
     this._setColorScheme(colorSchemePref);
 
-    this._mm.sendAsyncMessage("Reader:SetCharPref", {
-      name: "reader.color_scheme",
-      value: colorSchemePref
-    });
+    Services.prefs.setCharPref("reader.color_scheme", colorSchemePref);
   },
 
   _setFontType: function Reader_setFontType(newFontType) {
     if (this._fontType === newFontType)
       return;
 
     let bodyClasses = this._doc.body.classList;
 
     if (this._fontType)
       bodyClasses.remove(this._fontType);
 
     this._fontType = newFontType;
     bodyClasses.add(this._fontType);
 
-    this._mm.sendAsyncMessage("Reader:SetCharPref", {
-      name: "reader.font_type",
-      value: this._fontType
-    });
+    Services.prefs.setCharPref("reader.font_type", this._fontType);
   },
 
   _getToolbarVisibility: function Reader_getToolbarVisibility() {
     return !this._toolbarElement.classList.contains("toolbar-hidden");
   },
 
   _setToolbarVisibility: function Reader_setToolbarVisibility(visible) {
     let dropdown = this._doc.getElementById("style-dropdown");