commit 0eb9df4ce97615a9d8b6e7f395551d6c39309dc3 Author: Mike Perry mikeperry-git@fscked.org Date: Thu Aug 30 14:27:49 2012 -0700
Bug 6737: Disable JS hooks for FF15+ --- src/chrome/content/torbutton.js | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index 6ac88f1..a7c91dc 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -23,6 +23,7 @@ var m_tb_ff3 = false; var m_tb_ff35 = false; var m_tb_ff36 = false; var m_tb_ff4 = false; +var m_tb_ff15 = false; var m_tb_tbb = false;
var m_tb_control_port = null; @@ -511,6 +512,12 @@ function torbutton_init() { var versionChecker = Components.classes["@mozilla.org/xpcom/version-comparator;1"] .getService(Components.interfaces.nsIVersionComparator);
+ if(versionChecker.compare(appInfo.version, "15.0a1") >= 0) { + m_tb_ff15 = true; + } else { + m_tb_ff15 = false; + } + if(versionChecker.compare(appInfo.version, "4.0a1") >= 0) { m_tb_ff4 = true; } else { @@ -4716,6 +4723,11 @@ function torbutton_update_tags(win, new_loc) { // Bug 1506 P1: All of our JS hooks should be redone in patch form (#5856) // Also, tagging can be deprecated. function torbutton_hookdoc(win, doc, state_change, referrer) { + /* Firefox 15 broke the last of our JS hooks :/ */ + if (m_tb_ff15) { + return; + } + if(typeof(win.wrappedJSObject) == 'undefined') { torbutton_eclog(3, "No JSObject: "+win.location); return;
tor-commits@lists.torproject.org