Don't try to detect a proxy on documents with no docShell/webNav

This would previously have thrown an error. I'm not sure what these
documents would be, but it's a safe bet that they're not loaded in a
normal browser window.
This commit is contained in:
Simon Kornblith 2013-12-16 21:59:36 -05:00
parent b841ccf7b3
commit b5760d7f45

View file

@ -147,7 +147,9 @@ Zotero.Proxies = new function() {
try {
webNav = channel.notificationCallbacks.QueryInterface(Components.interfaces.nsIWebNavigation);
docShell = channel.notificationCallbacks.QueryInterface(Components.interfaces.nsIDocShell);
} catch(e) {}
} catch(e) {
return;
}
if(!docShell.allowMetaRedirects) return;