[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbutton/master] Bug #1968: Reset window.name in the content window on toggle
commit fef8cb176662120197bf10d955c1175c1dad82a2
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits