mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
246596 - crash in migration wizard trying to migrate non-existent Seamonkey profile
This commit is contained in:
parent
0811027962
commit
5e58715a59
@ -56,7 +56,7 @@ var MigrationWizard = {
|
||||
var contractID = kProfileMigratorContractIDPrefix + suffix;
|
||||
var migrator = Components.classes[contractID].createInstance(kIMig);
|
||||
if (!migrator.sourceExists)
|
||||
group.childNodes[i].disabled = true;
|
||||
group.childNodes[i].hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<!ENTITY importFromIE.label "Microsoft Internet Explorer">
|
||||
<!ENTITY importFromIE.accesskey "M">
|
||||
<!ENTITY importFromPhoenix.label "Phoenix, Firebird or Firefox 0.8">
|
||||
<!ENTITY importFromPhoenix.label "Firefox 0.8, Firebird or Phoenix">
|
||||
<!ENTITY importFromPhoenix.accesskey "P">
|
||||
<!ENTITY importFromNothing.label "Don't import anything">
|
||||
<!ENTITY importFromNothing.accesskey "D">
|
||||
|
@ -141,8 +141,12 @@ nsDogbertProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
|
||||
PRBool aReplace,
|
||||
PRUint16* aResult)
|
||||
{
|
||||
if (!mSourceProfile)
|
||||
*aResult = 0;
|
||||
if (!mSourceProfile) {
|
||||
GetSourceProfile(aProfile);
|
||||
if (!mSourceProfile)
|
||||
return NS_ERROR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
PRBool exists;
|
||||
MigrationData data[] = { { ToNewUnicode(PREF_FILE_NAME_IN_4x),
|
||||
|
@ -191,10 +191,6 @@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry(nsILocalFile* aRegistr
|
||||
nsXPIDLString profileName;
|
||||
node->GetName(getter_Copies(profileName));
|
||||
|
||||
nsCOMPtr<nsISupportsString> profileNameString(do_CreateInstance("@mozilla.org/supports-string;1"));
|
||||
profileNameString->SetData(profileName);
|
||||
aProfileNames->AppendElement(profileNameString);
|
||||
|
||||
// Get the profile location and add it to the locations array
|
||||
nsXPIDLString directory;
|
||||
reg->GetString(profile, NS_LITERAL_STRING("directory").get(), getter_Copies(directory));
|
||||
@ -212,8 +208,13 @@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry(nsILocalFile* aRegistr
|
||||
PRBool exists;
|
||||
dir->Exists(&exists);
|
||||
|
||||
if (exists)
|
||||
if (exists) {
|
||||
nsCOMPtr<nsISupportsString> profileNameString(do_CreateInstance("@mozilla.org/supports-string;1"));
|
||||
profileNameString->SetData(profileName);
|
||||
aProfileNames->AppendElement(profileNameString);
|
||||
|
||||
aProfileLocations->AppendElement(dir);
|
||||
}
|
||||
|
||||
keys->Next();
|
||||
}
|
||||
|
@ -139,8 +139,12 @@ nsOperaProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
|
||||
PRBool aReplace,
|
||||
PRUint16* aResult)
|
||||
{
|
||||
if (!mOperaProfile)
|
||||
*aResult = 0;
|
||||
if (!mOperaProfile) {
|
||||
GetOperaProfile(aProfile, getter_AddRefs(mOperaProfile));
|
||||
if (!mOperaProfile)
|
||||
return NS_ERROR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
MigrationData data[] = { { ToNewUnicode(OPERA_PREFERENCES_FILE_NAME),
|
||||
nsIBrowserProfileMigrator::SETTINGS,
|
||||
|
@ -129,8 +129,12 @@ nsPhoenixProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
|
||||
PRBool aReplace,
|
||||
PRUint16* aResult)
|
||||
{
|
||||
if (!mSourceProfile)
|
||||
*aResult = 0;
|
||||
if (!mSourceProfile) {
|
||||
GetSourceProfile(aProfile);
|
||||
if (!mSourceProfile)
|
||||
return NS_ERROR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
MigrationData data[] = { { ToNewUnicode(FILE_NAME_PREFS),
|
||||
nsIBrowserProfileMigrator::SETTINGS,
|
||||
|
@ -123,8 +123,13 @@ nsSeamonkeyProfileMigrator::GetMigrateData(const PRUnichar* aProfile,
|
||||
PRBool aReplace,
|
||||
PRUint16* aResult)
|
||||
{
|
||||
if (!mSourceProfile)
|
||||
*aResult = 0;
|
||||
|
||||
if (!mSourceProfile) {
|
||||
GetSourceProfile(aProfile);
|
||||
if (!mSourceProfile)
|
||||
return NS_ERROR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
MigrationData data[] = { { ToNewUnicode(FILE_NAME_PREFS),
|
||||
nsIBrowserProfileMigrator::SETTINGS,
|
||||
|
Loading…
x
Reference in New Issue
Block a user