Bug 1344644 - stop supporting outdated Edge bookmarks format to avoid hangs trying to open bookmarks database when Edge is open, r?dao
MozReview-Commit-ID: 2KihobvE8nV
--- a/browser/components/migration/EdgeProfileMigrator.js
+++ b/browser/components/migration/EdgeProfileMigrator.js
@@ -229,42 +229,21 @@ EdgeBookmarksMigrator.prototype = {
type: MigrationUtils.resourceTypes.BOOKMARKS,
get db() { return this.dbOverride || gEdgeDatabase },
get TABLE_NAME() { return "Favorites" },
get exists() {
if (!("_exists" in this)) {
- this._exists = !!this.db && this._checkTableExists();
+ this._exists = !!this.db;
}
return this._exists;
},
- _checkTableExists() {
- let database;
- let rv;
- try {
- let logFile = this.db.parent;
- logFile.append("LogFiles");
- database = ESEDBReader.openDB(this.db.parent, this.db, logFile);
-
- rv = database.tableExists(this.TABLE_NAME);
- } catch (ex) {
- Cu.reportError("Failed to check for table " + this.TABLE_NAME + " in Edge database at " +
- this.db.path + " due to the following error: " + ex);
- return false;
- } finally {
- if (database) {
- ESEDBReader.closeDB(database);
- }
- }
- return rv;
- },
-
migrate(callback) {
this._migrateBookmarks(PlacesUtils.bookmarks.menuGuid).then(
() => callback(true),
ex => {
Cu.reportError(ex);
callback(false);
}
);
@@ -398,22 +377,18 @@ function EdgeProfileMigrator() {
EdgeProfileMigrator.prototype = Object.create(MigratorPrototype);
EdgeProfileMigrator.prototype.getESEMigratorForTesting = function(dbOverride) {
return new EdgeBookmarksMigrator(dbOverride);
};
EdgeProfileMigrator.prototype.getResources = function() {
- let bookmarksMigrator = new EdgeBookmarksMigrator();
- if (!bookmarksMigrator.exists) {
- bookmarksMigrator = MSMigrationUtils.getBookmarksMigrator(MSMigrationUtils.MIGRATION_TYPE_EDGE);
- }
let resources = [
- bookmarksMigrator,
+ new EdgeBookmarksMigrator(),
MSMigrationUtils.getCookiesMigrator(MSMigrationUtils.MIGRATION_TYPE_EDGE),
new EdgeTypedURLMigrator(),
new EdgeReadingListMigrator(),
];
let windowsVaultFormPasswordsMigrator =
MSMigrationUtils.getWindowsVaultFormPasswordsMigrator();
windowsVaultFormPasswordsMigrator.name = "EdgeVaultFormPasswords";
resources.push(windowsVaultFormPasswordsMigrator);