[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [torbutton/maint-1.2] Fix a weird docShell interface issue for allowDNSPrefetch.
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Fri, 6 Nov 2009 15:04:54 -0800
Subject: Fix a weird docShell interface issue for allowDNSPrefetch.
Commit: 2872b946b85a9fb0ad2fa2a255832c9986bc85be
---
src/chrome/content/torbutton.js | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index f2a3bad..6220f8d 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1946,6 +1946,7 @@ function torbutton_toggle_win_jsplugins(win, tor_enabled, js_enabled, isolate_dy
// Likewise for DNS prefetch
if(m_tb_ff35) {
+ b.docShell.QueryInterface(Ci.nsIDocShell_MOZILLA_1_9_1_dns);
b.docShell.allowDNSPrefetch = !b.__tb_tor_fetched
&& !tor_enabled;
}
@@ -2019,6 +2020,7 @@ function torbutton_tag_new_browser(browser, tor_tag, no_plugins) {
}
if (!tor_tag && m_tb_ff35) {
+ browser.docShell.QueryInterface(Ci.nsIDocShell_MOZILLA_1_9_1_dns);
browser.docShell.allowDNSPrefetch = tor_tag;
}
@@ -2071,7 +2073,10 @@ function torbutton_conditional_set(state) {
if (state) {
if(b && b.docShell){
if(no_plugins) b.docShell.allowPlugins = false;
- if(m_tb_ff35) b.docShell.allowDNSPrefetch = false;
+ if(m_tb_ff35) {
+ b.docShell.QueryInterface(Ci.nsIDocShell_MOZILLA_1_9_1_dns);
+ b.docShell.allowDNSPrefetch = false;
+ }
} else {
try {
if (b && b.currentURI)
@@ -3186,7 +3191,10 @@ function torbutton_update_tags(win) {
/* We want to disable allowDNSPrefetch on Tor-loaded tabs
* before the load, because we don't want prefetch to be enabled
* on tor tabs once we leave Tor. */
- if(m_tb_ff35) browser.docShell.allowDNSPrefetch = tor_tag;
+ if(m_tb_ff35) {
+ browser.docShell.QueryInterface(Ci.nsIDocShell_MOZILLA_1_9_1_dns);
+ browser.docShell.allowDNSPrefetch = tor_tag;
+ }
if(js_enabled && !browser.docShell.allowJavascript) {
// Only care about re-enabling javascript.
--
1.5.6.5