commit d8dfd2fbcf46240eddf5c20bc55d2f294856558f Author: Arthur Edelstein arthuredelstein@gmail.com Date: Fri Jun 12 16:56:05 2015 -0700
Bug 16357: Use Mozilla API to wipe permissions db --- src/chrome/content/torbutton.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js index 5f4ba5c..0c48f30 100644 --- a/src/chrome/content/torbutton.js +++ b/src/chrome/content/torbutton.js @@ -20,6 +20,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "WebConsoleUtils", "resource://gre/modules/devtools/WebConsoleUtils.jsm");
let { LoadContextInfo } = Cu.import('resource://gre/modules/LoadContextInfo.jsm'); +let { Services } = Cu.import("resource://gre/modules/Services.jsm");
const k_tb_last_browser_version_pref = "extensions.torbutton.lastBrowserVersion"; const k_tb_browser_update_needed_pref = "extensions.torbutton.updateNeeded"; @@ -1769,8 +1770,7 @@ function torbutton_do_new_identity() { // This clears the STS cache and site permissions on Tor Browser // XXX: Tie to some kind of disk-ok pref? try { - m_tb_prefs.setBoolPref('permissions.memory_only', false); - m_tb_prefs.setBoolPref('permissions.memory_only', true); + Services.perms.removeAll(); } catch(e) { // Actually, this catch does not appear to be needed. Leaving it in for // safety though.