[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r20182: {torbutton} Fix Bug #970: purge the undo tab list on Tor toggle. (torbutton/trunk/src/chrome/content)



Author: mikeperry
Date: 2009-07-28 16:10:03 -0400 (Tue, 28 Jul 2009)
New Revision: 20182

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

Fix Bug #970: purge the undo tab list on Tor toggle.



Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2009-07-28 19:49:04 UTC (rev 20181)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2009-07-28 20:10:03 UTC (rev 20182)
@@ -1215,6 +1215,11 @@
     m_tb_prefs.setBoolPref("security.enable_ssl2", 
             !m_tb_prefs.getBoolPref("security.enable_ssl2"));
 
+    // This clears the undo tab history.
+    var tabs = m_tb_prefs.getIntPref("browser.sessionstore.max_tabs_undo");
+    m_tb_prefs.setIntPref("browser.sessionstore.max_tabs_undo", 0);
+    m_tb_prefs.setIntPref("browser.sessionstore.max_tabs_undo", tabs);
+ 
     var lp = m_tb_prefs.getIntPref("network.cookie.lifetimePolicy");
 
     if(lp == 1) {