Bug 1392929 - Temporary Fix for contentPrefService removal. r=IanN
This is just a workaround to avoid js errors during startup until a final fix is ready.
--- a/suite/common/dataman/dataman.js
+++ b/suite/common/dataman/dataman.js
@@ -50,17 +50,17 @@ var gDataman = {
this.debug = Services.prefs.getBoolPref("data_manager.debug");
}
catch (e) {}
this.bundle = document.getElementById("datamanBundle");
Services.obs.addObserver(this, "cookie-changed", false);
Services.obs.addObserver(this, "perm-changed", false);
Services.obs.addObserver(this, "passwordmgr-storage-changed", false);
- Services.contentPrefs.addObserver(null, this);
+ // Services.contentPrefs.addObserver(null, this);
Services.obs.addObserver(this, "satchel-storage-changed", false);
Services.obs.addObserver(this, "dom-storage-changed", false);
Services.obs.addObserver(this, "dom-storage2-changed", false);
this.timer = Components.classes["@mozilla.org/timer;1"]
.createInstance(Components.interfaces.nsITimer);
gTabs.initialize();
@@ -72,17 +72,17 @@ var gDataman = {
this.loadView(window.arguments[0])
}
},
shutdown: function dataman_shutdown() {
Services.obs.removeObserver(this, "cookie-changed");
Services.obs.removeObserver(this, "perm-changed");
Services.obs.removeObserver(this, "passwordmgr-storage-changed");
- Services.contentPrefs.removeObserver(null, this);
+ // Services.contentPrefs.removeObserver(null, this);
Services.obs.removeObserver(this, "satchel-storage-changed");
Services.obs.removeObserver(this, "dom-storage-changed");
Services.obs.removeObserver(this, "dom-storage2-changed");
gDomains.shutdown();
},
loadView: function dataman_loadView(aView) {
@@ -254,17 +254,17 @@ var gDomains = {
this.selectfield = document.getElementById("typeSelect");
this.searchfield = document.getElementById("domainSearch");
// global "domain"
this.domainObjects["*"] = {title: "*",
displayTitle: "*",
hasPermissions: true,
- hasPreferences: Services.contentPrefs.getPrefs(null, null).enumerator.hasMoreElements(),
+// hasPreferences: Services.contentPrefs.getPrefs(null, null).enumerator.hasMoreElements(),
hasFormData: true};
this.search("");
if (!gDataman.viewToLoad.length)
this.tree.view.selection.select(0);
let loaderInstance;
function nextStep() {
--- a/suite/common/viewZoomOverlay.js
+++ b/suite/common/viewZoomOverlay.js
@@ -7,17 +7,18 @@
// One of the possible values for the mousewheel.* preferences.
// From nsEventStateManager.cpp.
const MOUSE_SCROLL_ZOOM = 3;
/**
* Controls the "full zoom" setting and its site-specific preferences.
*/
var FullZoom = FullZoom || {
- contentPrefs: Services.contentPrefs.QueryInterface(Components.interfaces.nsIContentPrefService2),
+ contentPrefs: Components.classes["@mozilla.org/content-pref/service;1"]
+ .getService(Components.interfaces.nsIContentPrefService2),
// Identifies the setting in the content prefs database.
name: "browser.content.full-zoom",
// The global value (if any) for the setting. Asynchronously loaded from the
// service when first requested, then updated by the pref change listener as
// it changes. If there is no global value, then this should be undefined.
globalValue: undefined,