Bug 1394298 - Don't use atom service in Gecko versions > 22. r=gijs
--- a/xul/content/static.js
+++ b/xul/content/static.js
@@ -291,25 +291,28 @@ function initStatic()
// XXX Bug 335998: See cmdHideView for usage of this.
client.hiddenDocument = document.implementation.createDocument(null, null, null);
multilineInputMode(client.prefs["multiline"]);
updateSpellcheck(client.prefs["inputSpellcheck"]);
// Initialize userlist stuff
- // cache all the atoms to stop us crossing XPCOM boundaries *all the time*
- client.atomCache = new Object();
- var atomSvc = getService("@mozilla.org/atom-service;1", "nsIAtomService");
- var atoms = ["founder-true", "founder-false", "admin-true", "admin-false",
- "op-true", "op-false", "halfop-true", "halfop-false",
- "voice-true", "voice-false", "away-true", "away-false",
- "unselected"];
- for (var i = 0; i < atoms.length; i++)
- client.atomCache[atoms[i]] = atomSvc.getAtom(atoms[i]);
+
+ if (Services.vc.compare(Services.appinfo.platformVersion, "22.0") < 0) {
+ // cache all the atoms to stop us crossing XPCOM boundaries *all the time*
+ client.atomCache = new Object();
+ var atomSvc = getService("@mozilla.org/atom-service;1", "nsIAtomService");
+ var atoms = ["founder-true", "founder-false", "admin-true", "admin-false",
+ "op-true", "op-false", "halfop-true", "halfop-false",
+ "voice-true", "voice-false", "away-true", "away-false",
+ "unselected"];
+ for (var i = 0; i < atoms.length; i++)
+ client.atomCache[atoms[i]] = atomSvc.getAtom(atoms[i]);
+ }
if (client.prefs["showModeSymbols"])
setListMode("symbol");
else
setListMode("graphic");
var tree = document.getElementById('user-list');
tree.setAttribute("ondragstart",