Bug 345517, try #2, make the browser component use frozen linkage, so that ff+xr builds. This does *not* --enable-libxul by default for Firefox (yet). That will wait until after 1.9a1. Older patch r=darin+mento, revisions r=mano
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsBrowserProfileMigratorUtils.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsDogbertProfileMigrator.h"
|
||||
#include "nsICookieManager2.h"
|
||||
#include "nsIFile.h"
|
||||
@@ -53,12 +52,12 @@
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "prprf.h"
|
||||
#include "prenv.h"
|
||||
#include "nsEscape.h"
|
||||
#include "NSReg.h"
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
#include "nsDirectoryServiceUtils.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#ifdef _MAX_PATH
|
||||
@@ -289,7 +288,7 @@ nsDogbertProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult)
|
||||
if (!mProfiles) {
|
||||
nsresult rv;
|
||||
|
||||
rv = NS_NewISupportsArray(getter_AddRefs(mProfiles));
|
||||
mProfiles = do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIFile> regFile;
|
||||
@@ -361,7 +360,7 @@ nsDogbertProfileMigrator::GetSourceProfiles(nsISupportsArray** aResult)
|
||||
|
||||
mSourceProfile = profileFile;
|
||||
|
||||
rv = NS_NewISupportsArray(getter_AddRefs(mProfiles));
|
||||
mProfiles = do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsISupportsString> nameString
|
||||
@@ -566,7 +565,7 @@ nsDogbertProfileMigrator::FixDogbertCookies()
|
||||
|
||||
// skip line if it is a comment or null line
|
||||
if (buffer.IsEmpty() || buffer.CharAt(0) == '#' ||
|
||||
buffer.CharAt(0) == nsCRT::CR || buffer.CharAt(0) == nsCRT::LF) {
|
||||
buffer.CharAt(0) == '\r' || buffer.CharAt(0) == '\n') {
|
||||
fileOutputStream->Write(buffer.get(), buffer.Length(), &written);
|
||||
continue;
|
||||
}
|
||||
@@ -583,10 +582,12 @@ nsDogbertProfileMigrator::FixDogbertCookies()
|
||||
continue;
|
||||
|
||||
// separate the expires field from the rest of the cookie line
|
||||
nsCAutoString prefix, expiresString, suffix;
|
||||
buffer.Mid(prefix, hostIndex, expiresIndex-hostIndex-1);
|
||||
buffer.Mid(expiresString, expiresIndex, nameIndex-expiresIndex-1);
|
||||
buffer.Mid(suffix, nameIndex, buffer.Length()-nameIndex);
|
||||
const nsDependentCSubstring prefix =
|
||||
Substring(buffer, hostIndex, expiresIndex-hostIndex-1);
|
||||
const nsDependentCSubstring expiresString =
|
||||
Substring(buffer, expiresIndex, nameIndex-expiresIndex-1);
|
||||
const nsDependentCSubstring suffix =
|
||||
Substring(buffer, nameIndex, buffer.Length()-nameIndex);
|
||||
|
||||
// correct the expires field
|
||||
char* expiresCString = ToNewCString(expiresString);
|
||||
@@ -643,7 +644,7 @@ nsDogbertProfileMigrator::MigrateDogbertBookmarks()
|
||||
dogbertPrefsFile->Append(PREF_FILE_NAME_IN_4x);
|
||||
psvc->ReadUserPrefs(dogbertPrefsFile);
|
||||
|
||||
nsXPIDLCString toolbarName;
|
||||
nsCString toolbarName;
|
||||
nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
|
||||
rv = branch->GetCharPref("custtoolbar.personal_toolbar_folder", getter_Copies(toolbarName));
|
||||
// If the pref wasn't set in the user's 4.x preferences, there's no way we can "Fix" the
|
||||
@@ -663,5 +664,5 @@ nsDogbertProfileMigrator::MigrateDogbertBookmarks()
|
||||
targetBookmarksFile->Append(BOOKMARKS_FILE_NAME_IN_5x);
|
||||
|
||||
return AnnotatePersonalToolbarFolder(sourceBookmarksFile,
|
||||
targetBookmarksFile, toolbarName);
|
||||
targetBookmarksFile, toolbarName.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user