зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1665442 - cleanup in browser migration code while passing by, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D93617
This commit is contained in:
Родитель
1d585e9840
Коммит
79cf5eb5d9
|
@ -240,7 +240,7 @@ var MigratorPrototype = {
|
|||
getMigrateData: async function MP_getMigrateData(aProfile) {
|
||||
let resources = await this._getMaybeCachedResources(aProfile);
|
||||
if (!resources) {
|
||||
return [];
|
||||
return 0;
|
||||
}
|
||||
let types = resources.map(r => r.type);
|
||||
return types.reduce((a, b) => {
|
||||
|
|
|
@ -372,7 +372,7 @@ var MigrationWizard = {
|
|||
}
|
||||
|
||||
var items = this.spinResolve(
|
||||
this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate)
|
||||
this._migrator.getMigrateData(this._selectedProfile)
|
||||
);
|
||||
|
||||
for (let itemType of kDataToStringMap.keys()) {
|
||||
|
@ -485,7 +485,7 @@ var MigrationWizard = {
|
|||
// When automigrating, show all of the data that can be received from this source.
|
||||
if (this._autoMigrate) {
|
||||
this._itemsFlags = this.spinResolve(
|
||||
this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate)
|
||||
this._migrator.getMigrateData(this._selectedProfile)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,11 +37,10 @@ interface nsIBrowserProfileMigrator : nsISupports
|
|||
* offers for import.
|
||||
* @param aProfile the profile that we are looking for available data
|
||||
* to import
|
||||
* @param aDoingStartup "true" if the profile is not currently being used.
|
||||
* @return Promise containing a bit field containing profile items (see above)
|
||||
* @note a return value of 0 represents no items rather than ALL.
|
||||
*/
|
||||
jsval getMigrateData(in jsval aProfile, in boolean aDoingStartup);
|
||||
jsval getMigrateData(in jsval aProfile);
|
||||
|
||||
/**
|
||||
* Get the last time data from this browser was modified
|
||||
|
|
|
@ -58,7 +58,7 @@ async function promiseMigration(
|
|||
succeeds = null
|
||||
) {
|
||||
// Ensure resource migration is available.
|
||||
let availableSources = await migrator.getMigrateData(aProfile, false);
|
||||
let availableSources = await migrator.getMigrateData(aProfile);
|
||||
Assert.ok(
|
||||
(availableSources & resourceType) > 0,
|
||||
"Resource supported by migrator"
|
||||
|
|
Загрузка…
Ссылка в новой задаче