Bug 791799 - Settings: Remove mozSettings.getLock. r=fabrice
authorGregor Wagner <anygregor@gmail.com>
Wed, 19 Sep 2012 10:21:30 -0700
changeset 107511 847fc3deee986429546e2016ad89a915b28f1ce4
parent 107510 c0d1f69cc901b06c8febfc12f3363aa8de28694b
child 107512 6d3db18ef4cd0c4442e642db583dbb36e1e45bff
push id23490
push userMs2ger@gmail.com
push dateThu, 20 Sep 2012 11:22:06 +0000
treeherdermozilla-central@6a2d1a3556b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs791799
milestone18.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 791799 - Settings: Remove mozSettings.getLock. r=fabrice
dom/interfaces/settings/nsIDOMSettingsManager.idl
dom/settings/SettingsManager.js
dom/settings/SettingsManager.manifest
--- a/dom/interfaces/settings/nsIDOMSettingsManager.idl
+++ b/dom/interfaces/settings/nsIDOMSettingsManager.idl
@@ -15,19 +15,18 @@ interface nsIDOMSettingsLock : nsISuppor
   nsIDOMDOMRequest set(in nsIVariant settings);
 
   // result contains the value of the setting.
   nsIDOMDOMRequest get(in jsval name);
 
   nsIDOMDOMRequest clear();
 };
 
-[scriptable, uuid(0694f5e0-f777-11e1-a21f-0800200c9a66)]
+[scriptable, uuid(c40b1c70-00fb-11e2-a21f-0800200c9a66)]
 interface nsIDOMSettingsManager : nsISupports
 {
   nsIDOMSettingsLock createLock();
-  nsIDOMSettingsLock getLock();
 
   void addObserver(in DOMString name, in jsval callback);
   void removeObserver(in DOMString name, in jsval callback);
 
   attribute nsIDOMEventListener onsettingchange;
 };
--- a/dom/settings/SettingsManager.js
+++ b/dom/settings/SettingsManager.js
@@ -204,17 +204,17 @@ SettingsLock.prototype = {
   classInfo : XPCOMUtils.generateCI({classID: SETTINGSLOCK_CID,
                                      contractID: SETTINGSLOCK_CONTRACTID,
                                      classDescription: "SettingsLock",
                                      interfaces: [nsIDOMSettingsLock],
                                      flags: nsIClassInfo.DOM_OBJECT})
 };
 
 const SETTINGSMANAGER_CONTRACTID = "@mozilla.org/settingsManager;1";
-const SETTINGSMANAGER_CID        = Components.ID("{0694f5e0-f777-11e1-a21f-0800200c9a66}");
+const SETTINGSMANAGER_CID        = Components.ID("{c40b1c70-00fb-11e2-a21f-0800200c9a66}");
 const nsIDOMSettingsManager      = Ci.nsIDOMSettingsManager;
 
 let myGlobal = this;
 
 function SettingsManager()
 {
   this._locks = new Queue();
   if (!("indexedDB" in myGlobal)) {
@@ -254,21 +254,16 @@ SettingsManager.prototype = {
     this._settingsDB.ensureDB(
       function() { lock.createTransactionAndProcess(); },
       function() { dump("ensureDB error cb!\n"); },
       myGlobal );
     this.nextTick(function() { this._open = false; }, lock);
     return lock;
   },
 
-  getLock: function() {
-    dump("WARNING: Use createLock instead of getLock!");
-    return this.createLock();
-  },
-
   receiveMessage: function(aMessage) {
     debug("Settings::receiveMessage: " + aMessage.name);
     let msg = aMessage.json;
 
     switch (aMessage.name) {
       case "Settings:Change:Return:OK":
         debug("Settings:Change:Return:OK");
         if (this._onsettingchange || this._callbacks) {
--- a/dom/settings/SettingsManager.manifest
+++ b/dom/settings/SettingsManager.manifest
@@ -1,6 +1,6 @@
-component {0694f5e0-f777-11e1-a21f-0800200c9a66} SettingsManager.js
-contract @mozilla.org/settingsManager;1 {0694f5e0-f777-11e1-a21f-0800200c9a66}
+component {c40b1c70-00fb-11e2-a21f-0800200c9a66} SettingsManager.js
+contract @mozilla.org/settingsManager;1 {c40b1c70-00fb-11e2-a21f-0800200c9a66}
 category JavaScript-navigator-property mozSettings @mozilla.org/settingsManager;1
 
 component {ef95ddd0-6308-11e1-b86c-0800200c9a66} SettingsManager.js
 contract @mozilla.org/settingsLock;1 {ef95ddd0-6308-11e1-b86c-0800200c9a66}