[tor-commits] [torbutton/master] Bug #1968: Reset window.name in the content window on toggle
mikeperry at torproject.org
mikeperry at torproject.org
Mon Feb 28 04:38:53 UTC 2011
commit fef8cb176662120197bf10d955c1175c1dad82a2
Author: Mike Perry <mikeperry-git at fscked.org>
Date: Sun Feb 27 20:38:03 2011 -0800
Bug #1968: Reset window.name in the content window on toggle
---
src/chrome/content/torbutton.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index c45a8df..3fe8145 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -2260,6 +2260,16 @@ function torbutton_check_js_tag(browser, tor_enabled, js_enabled) {
torbutton_log(4, "Failed to disable JS events: "+e)
}
+ try {
+ // My estimation is that this does not get the inner iframe windows,
+ // but that does not matter, because iframes should be destroyed
+ // on the next load.
+ browser.contentWindow.name = null;
+ browser.contentWindow.window.name = null;
+ } catch(e) {
+ torbutton_log(4, "Failed to reset window.name: "+e)
+ }
+
if(browser.__tb_tor_fetched == tor_enabled) { // States match, js ok
browser.docShell.allowJavascript = js_enabled;
if (eventSuppressor)
More information about the tor-commits
mailing list