Bug 740968 - Cleanup SettingsManager.js. r=fabrice
authorGregor Wagner <anygregor@gmail.com>
Fri, 30 Mar 2012 14:26:59 -0700
changeset 94064 297ddf568a6a876d5943567bfaca353075031747
parent 94063 176df86aa16e09484a4b17b8933511d1ed2935f2
child 94065 fa5f41ab53150ccb79538437efc2fd1e310307da
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs740968
milestone14.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 740968 - Cleanup SettingsManager.js. r=fabrice
dom/settings/SettingsManager.js
--- a/dom/settings/SettingsManager.js
+++ b/dom/settings/SettingsManager.js
@@ -159,24 +159,21 @@ SettingsLock.prototype = {
             } else {
               //Workaround for cloning issues
               let obj = JSON.parse(JSON.stringify(info.settings[key]));
               req = store.put({settingName: key, settingValue: obj});
             }
 
             req.onsuccess = function() { 
               lock._open = true;
-
               Services.DOMRequest.fireSuccess(request, 0);
-
               Services.obs.notifyObservers(lock, "mozsettings-changed", JSON.stringify({
                 key: key,
                 value: info.settings[key]
               }));
-
               lock._open = false;
             };
 
             req.onerror = function() { Services.DOMRequest.fireError(request, 0) };
           }
           break;
         case "get":
           if (info.name == "*") {
@@ -349,31 +346,28 @@ SettingsManager.prototype = {
         Services.obs.removeObserver(this, "mozsettings-changed");
         this._requests = null;
         this._window = null;
         this._innerWindowID = null;
         this._onsettingchange = null;
         this._settingsDB.close();
       }
     } else if (aTopic == "mozsettings-changed") {
-      dump('\r\r\r11111111111111111111111111111r\n');
-      dump(this._window + '\n');
       if (!this._onsettingchange)
         return;
 
       let data = JSON.parse(aData);
-      debug(data + ':' + data.key + ':' + data.value + '\n');
+      debug('data:' + data.key + ':' + data.value + '\n');
 
       let event = new this._window.MozSettingsEvent("settingchanged", {
         settingName: data.key,
         settingValue: data.value
       });
 
       this._onsettingchange.handleEvent(event);
-      dump('\r\r\r2222222222222222222222222222222222\n');
     }
   },
 
   classID : SETTINGSMANAGER_CID,
   QueryInterface : XPCOMUtils.generateQI([nsIDOMSettingsManager, Ci.nsIDOMGlobalPropertyInitializer]),
 
   classInfo : XPCOMUtils.generateCI({classID: SETTINGSMANAGER_CID,
                                      contractID: SETTINGSMANAGER_CONTRACTID,