[or-cvs] [torbutton/master 24/31] For some reason on FF4, we lack a content window for some observer events.

mikeperry at torproject.org mikeperry at torproject.org
Tue Jan 4 07:02:20 UTC 2011


Author: Mike Perry <mikeperry-git at fscked.org>
Date: Mon, 3 Jan 2011 00:34:46 -0600
Subject: For some reason on FF4, we lack a content window for some observer events.
Commit: cc54f29aee6c0c1277868d16072df862b5f6c761

---
 src/chrome/content/torbutton.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 7f05121..63545e5 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -3672,6 +3672,12 @@ function torbutton_update_tags(win, new_loc) {
 
     // This sometimes happens with CoolPreviews..
     try {
+        // XXX: sometimes we get a dialog window here in FF4?
+        if (!browser.contentWindow) {
+          torbutton_log(3, "No content window for: "+browser.location);
+          return;
+        }
+
         torbutton_log(2, "Got browser "+browser.contentWindow.location+" for: " 
             + win.location + ", under: "+win.top.location);
     } catch(e) {
-- 
1.7.1




More information about the tor-commits mailing list