commit 709c3fb7ef212e9b1b75db3d0a8512e4b03474ff Author: Mike Perry mikeperry-git@fscked.org Date: Thu Sep 1 17:28:18 2011 -0700
Bug #3879: Framed sites broken (yopmail, gmane, gmaps, etc)
We were accidentally clearing the name attribute of framesets because we got notification before the referrer could be set on the channel. --- src/chrome/content/torbutton.js | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index ee4b03e..6496895 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -4232,9 +4232,12 @@ function torbutton_hookdoc(win, doc, state_change, referrer) { // This keeps window.name clean between fresh urls. // It should also apply to iframes because hookdoc gets called for all // frames and subdocuments. - if (!referrer || referrer.spec == "") { - win.name = null; - win.window.name = null; + // + // The about:blank check handles the 'name' attribute of framesets, which + // get set before the referer is set on the channel. + if ((!referrer || referrer.spec == "") && win.location != "about:blank") { + win.name = ""; + win.window.name = ""; } } catch(e) { torbutton_log(4, "Failed to reset window.name: "+e)
tor-commits@lists.torproject.org