[or-cvs] r18970: {torbutton} I suppose it could be null here too. Who knows. (torbutton/trunk/src/chrome/content)

mikeperry at seul.org mikeperry at seul.org
Fri Mar 13 20:37:24 UTC 2009


Author: mikeperry
Date: 2009-03-13 16:37:24 -0400 (Fri, 13 Mar 2009)
New Revision: 18970

Modified:
   torbutton/trunk/src/chrome/content/torbutton.js
Log:

I suppose it could be null here too. Who knows.



Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2009-03-13 20:26:06 UTC (rev 18969)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2009-03-13 20:37:24 UTC (rev 18970)
@@ -1958,8 +1958,19 @@
             var b = browser.browsers[i];
 
             if (!state && no_plugins) {
-                b.docShell.allowPlugins = false;
-            } 
+                if(b && b.docShell){
+                    b.docShell.allowPlugins = false;
+                } else {
+                    try {
+                        if (b && b.currentURI) 
+                            torbutton_log(5, "Initial docShell is null for: "+b.currentURI.spec);
+                        else 
+                            torbutton_log(5, "Initial docShell is null for unknown URL");
+                    } catch(e) {
+                        torbutton_log(5, "Initial docShell is null for unparsable URL: "+e);
+                    }
+                } 
+            }
             b.__tb_tor_fetched = state;
         }
     }



More information about the tor-commits mailing list