X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fcontent%2Fdisable-acr.jsm;h=86e55c4a4a05021f1131e2a5a175ea98e6c1b376;hb=3d837eb266a3a01d424192aa4ec1a167366178c5;hp=3481cda8bc70755849b15c955ec24a107492caa7;hpb=70740024f9c028c1fd63e1a1850ab062ff956054;p=dactyl.git diff --git a/common/content/disable-acr.jsm b/common/content/disable-acr.jsm index 3481cda..86e55c4 100644 --- a/common/content/disable-acr.jsm +++ b/common/content/disable-acr.jsm @@ -8,8 +8,7 @@ const OVERLAY_URLS = [ "chrome://mozapps/content/extensions/extensions.xul" ]; -const Ci = Components.interfaces; -const Cu = Components.utils; +let { interfaces: Ci, utils: Cu } = Components; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -64,11 +63,14 @@ function chromeDocuments() { let docShells = window.docShell.getDocShellEnumerator(Ci.nsIDocShellTreeItem[type], Ci.nsIDocShell.ENUMERATE_FORWARDS); while (docShells.hasMoreElements()) - yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument; + try { + yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument; + } + catch (e) {} } } } var EXPORTED_SYMBOLS = ["cleanup", "init"]; -// vim: set fdm=marker sw=4 ts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: