Refactors history and how the database is stored
This commit is contained in:
parent
9c59437ac3
commit
b39f0c311c
7 changed files with 37 additions and 55 deletions
|
@ -128,15 +128,19 @@ let PdfJs = {
|
|||
},
|
||||
|
||||
_migrate: function migrate() {
|
||||
const VERSION = 1;
|
||||
const VERSION = 2;
|
||||
var currentVersion = getIntPref(PREF_MIGRATION_VERSION, 0);
|
||||
if (currentVersion >= VERSION) {
|
||||
return;
|
||||
}
|
||||
// Make pdf.js the default pdf viewer on the first migration.
|
||||
if (currentVersion < 2) {
|
||||
if (currentVersion < 1) {
|
||||
this._becomeHandler();
|
||||
}
|
||||
if (currentVersion < 2) {
|
||||
// cleaning up of unused database preference (see #3994)
|
||||
Services.prefs.clearUserPref(PREF_PREFIX + '.database');
|
||||
}
|
||||
Services.prefs.setIntPref(PREF_MIGRATION_VERSION, VERSION);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue