Bug 738263 - Part 1: actually break default bookmarks import by will, to avoid worse handling.

r=Mano
This commit is contained in:
Marco Bonardo
2012-04-04 15:35:27 +02:00
parent bfff2e0ca9
commit 932ccdedb1

View File

@@ -139,9 +139,15 @@ let MigratorPrototype = {
*/
migrate: function MP_migrate(aItems, aStartup, aProfile) {
// Not using aStartup because it's going away soon.
if (MigrationUtils.isStartupMigration && !this.startupOnlyMigrator)
if (MigrationUtils.isStartupMigration && !this.startupOnlyMigrator) {
MigrationUtils.profileStartup.doStartup();
// Notify glue we are about to do initial migration, otherwise it may try
// to restore default bookmarks overwriting the imported ones.
Cc["@mozilla.org/browser/browserglue;1"].getService(Ci.nsIObserver)
.observe(null, "initial-migration", null);
}
let resources = this._getMaybeCachedResources(aProfile);
if (resources.length == 0)
throw new Error("migrate called for a non-existent source");