зеркало из https://github.com/mozilla/gecko-dev.git
final patch for bug 234908 "getter_Copies scoping problem" r+sr=dbaron
This commit is contained in:
Родитель
92e13337aa
Коммит
8bdaba45ad
|
@ -94,8 +94,8 @@ NS_IMETHODIMP nsIDNService::Observe(nsISupports *aSubject,
|
|||
}
|
||||
else if (NS_LITERAL_STRING(NS_NET_PREF_IDNPREFIX).Equals(aData)) {
|
||||
nsXPIDLCString prefix;
|
||||
if (NS_SUCCEEDED(prefBranch->GetCharPref(NS_NET_PREF_IDNPREFIX, getter_Copies(prefix))) &&
|
||||
prefix.Length() <= kACEPrefixLen)
|
||||
nsresult rv = prefBranch->GetCharPref(NS_NET_PREF_IDNPREFIX, getter_Copies(prefix));
|
||||
if (NS_SUCCEEDED(rv) && prefix.Length() <= kACEPrefixLen)
|
||||
PL_strncpyz(nsIDNService::mACEPrefix, prefix.get(), kACEPrefixLen + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -921,10 +921,12 @@ static nsresult InitializeProfileService(nsICmdLineService *cmdLineArgs)
|
|||
// If we were launched with -silent, we cannot show UI, either.
|
||||
if (shouldShowUI) {
|
||||
nsXPIDLCString arg;
|
||||
if (NS_SUCCEEDED(cmdLineArgs->GetCmdLineValue("-silent", getter_Copies(arg))) && (const char*)arg) {
|
||||
if (NS_SUCCEEDED(cmdLineArgs->GetCmdLineValue("-silent", getter_Copies(arg)))) {
|
||||
if ((const char*)arg) {
|
||||
shouldShowUI = PR_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIAppShellService> appShellService(do_GetService(kAppShellServiceCID, &rv));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
|
|
@ -2142,9 +2142,11 @@ nsNativeAppSupportOS2::EnsureProfile(nsICmdLineService* args)
|
|||
// See if profile manager is being suppressed via -silent flag.
|
||||
PRBool canInteract = PR_TRUE;
|
||||
nsXPIDLCString arg;
|
||||
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg))) && (const char*)arg) {
|
||||
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg)))) {
|
||||
if ((const char*)arg) {
|
||||
canInteract = PR_FALSE;
|
||||
}
|
||||
}
|
||||
rv = appShell->DoProfileStartup(args, canInteract);
|
||||
|
||||
mForceProfileStartup = PR_FALSE;
|
||||
|
|
|
@ -2108,9 +2108,11 @@ printf( "Setting ddexec subkey entries\n" );
|
|||
// See if profile manager is being suppressed via -silent flag.
|
||||
PRBool canInteract = PR_TRUE;
|
||||
nsXPIDLCString arg;
|
||||
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg))) && (const char*)arg) {
|
||||
if (NS_SUCCEEDED(args->GetCmdLineValue("-silent", getter_Copies(arg)))) {
|
||||
if ((const char*)arg) {
|
||||
canInteract = PR_FALSE;
|
||||
}
|
||||
}
|
||||
rv = appShell->DoProfileStartup(args, canInteract);
|
||||
|
||||
mForceProfileStartup = PR_FALSE;
|
||||
|
|
|
@ -1698,8 +1698,8 @@ nsBookmarksService::Init()
|
|||
// determine what the name of the Personal Toolbar Folder is...
|
||||
// first from user preference, then string bundle, then hard-coded default
|
||||
nsXPIDLCString prefValue;
|
||||
if (NS_SUCCEEDED(rv = prefBranch->GetCharPref("custtoolbar.personal_toolbar_folder", getter_Copies(prefValue))
|
||||
&& !prefValue.IsEmpty()))
|
||||
rv = prefBranch->GetCharPref("custtoolbar.personal_toolbar_folder", getter_Copies(prefValue));
|
||||
if (NS_SUCCEEDED(rv) && !prefValue.IsEmpty())
|
||||
{
|
||||
CopyUTF8toUTF16(prefValue, mPersonalToolbarName);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче