summaryrefslogtreecommitdiffstats
path: root/webbrowser/components
diff options
context:
space:
mode:
Diffstat (limited to 'webbrowser/components')
-rw-r--r--webbrowser/components/nsBrowserGlue.js33
1 files changed, 28 insertions, 5 deletions
diff --git a/webbrowser/components/nsBrowserGlue.js b/webbrowser/components/nsBrowserGlue.js
index e8eefa4..b4f7cf1 100644
--- a/webbrowser/components/nsBrowserGlue.js
+++ b/webbrowser/components/nsBrowserGlue.js
@@ -1198,7 +1198,7 @@ BrowserGlue.prototype = {
},
_migrateUI: function BG__migrateUI() {
- const UI_VERSION = 20;
+ const UI_VERSION = 21;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
let currentUIVersion = 0;
try {
@@ -1240,10 +1240,33 @@ BrowserGlue.prototype = {
}
#endif
- if (currentUIVersion < 20) {
- // HPKP change of UI preference; reset enforcement level
- Services.prefs.clearUserPref("security.cert_pinning.eforcement_level");
- }
+if (currentUIVersion < 20) {
+ // HPKP change of UI preference; reset enforcement level
+ Services.prefs.clearUserPref("security.cert_pinning.eforcement_level");
+}
+
+if (currentUIVersion < 21) {
+ //remove key4.db and cert9.db if those files exist
+ // XXX: Remove this code block once we actually start using them.
+ let dsCertFile = Cc["@mozilla.org/file/directory_service;1"]
+ .getService(Ci.nsIProperties)
+ .get("ProfD", Ci.nsIFile);
+ dsKeyFile = dsCertFile.clone();
+ dsCertFile.append("cert9.db");
+ if (dsCertFile.exists()) {
+ try { dsCertFile.remove(false); } catch(e) {}
+ }
+ if ((dsKeyFile.exists()) {
+ try { dsKeyFile.remove(false); } catch(e) {}
+ }
+}
+
+// Clear out dirty storage
+if (this._dirty)
+ this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush();
+
+delete this._rdf;
+delete this._dataSource;
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);