Bug 785233 - Don't overwrite indexeddb property. r=mrbkap
authorGregor Wagner <gwagner@mozilla.com>
Wed, 29 Aug 2012 15:52:48 -0300
changeset 103794 706174d31a02090effd97222dd174dbf2a2954c5
parent 103793 f8254a69dff0c1b4843524947b045f8caf8f5176
child 103795 1dce4807ad0182d424b296815de85f3de884ec29
child 106789 7bf95bb092331b1db96ba9d561400fcdfb9f09d6
push id14168
push usergwagner@mozilla.com
push dateWed, 29 Aug 2012 18:53:29 +0000
treeherdermozilla-inbound@706174d31a02 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs785233
milestone18.0a1
first release with
nightly linux32
706174d31a02 / 18.0a1 / 20120830030531 / files
nightly linux64
706174d31a02 / 18.0a1 / 20120830030531 / files
nightly mac
706174d31a02 / 18.0a1 / 20120830030531 / files
nightly win32
706174d31a02 / 18.0a1 / 20120830030531 / files
nightly win64
706174d31a02 / 18.0a1 / 20120830030531 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 785233 - Don't overwrite indexeddb property. r=mrbkap
dom/settings/SettingsManager.js
--- a/dom/settings/SettingsManager.js
+++ b/dom/settings/SettingsManager.js
@@ -212,18 +212,20 @@ const SETTINGSMANAGER_CONTRACTID = "@moz
 const SETTINGSMANAGER_CID        = Components.ID("{dd9f5380-a454-11e1-b3dd-0800200c9a66}");
 const nsIDOMSettingsManager      = Ci.nsIDOMSettingsManager;
 
 let myGlobal = this;
 
 function SettingsManager()
 {
   this._locks = new Queue();
-  var idbManager = Components.classes["@mozilla.org/dom/indexeddb/manager;1"].getService(Ci.nsIIndexedDatabaseManager);
-  idbManager.initWindowless(myGlobal);
+  if (!("indexedDB" in myGlobal)) {
+    let idbManager = Components.classes["@mozilla.org/dom/indexeddb/manager;1"].getService(Ci.nsIIndexedDatabaseManager);
+    idbManager.initWindowless(myGlobal);
+  }
   this._settingsDB = new SettingsDB();
   this._settingsDB.init(myGlobal);
 }
 
 SettingsManager.prototype = {
   _onsettingchange: null,
   _callbacks: null,