diff --git a/dom/src/base/nsScriptNameSpaceManager.cpp b/dom/src/base/nsScriptNameSpaceManager.cpp index c768027f8a5..fa771e5c8d2 100644 --- a/dom/src/base/nsScriptNameSpaceManager.cpp +++ b/dom/src/base/nsScriptNameSpaceManager.cpp @@ -95,7 +95,7 @@ nsScriptNameSpaceManager::FillHash(nsICategoryManager *aCategoryManager, continue; } - const nsAString& temp = NS_ConvertASCIItoUCS2(categoryEntry); + NS_ConvertASCIItoUCS2 temp(categoryEntry); // XXX Mac chokes _later_ if we put the |NS_Conv...| right in the |nsStringKey| ctor, so make a temp nsStringKey key(temp); diff --git a/dom/src/build/nsScriptNameSpaceManager.cpp b/dom/src/build/nsScriptNameSpaceManager.cpp index c768027f8a5..fa771e5c8d2 100644 --- a/dom/src/build/nsScriptNameSpaceManager.cpp +++ b/dom/src/build/nsScriptNameSpaceManager.cpp @@ -95,7 +95,7 @@ nsScriptNameSpaceManager::FillHash(nsICategoryManager *aCategoryManager, continue; } - const nsAString& temp = NS_ConvertASCIItoUCS2(categoryEntry); + NS_ConvertASCIItoUCS2 temp(categoryEntry); // XXX Mac chokes _later_ if we put the |NS_Conv...| right in the |nsStringKey| ctor, so make a temp nsStringKey key(temp); diff --git a/profile/src/nsProfile.cpp b/profile/src/nsProfile.cpp index be842f5f84e..b06e7993ab7 100644 --- a/profile/src/nsProfile.cpp +++ b/profile/src/nsProfile.cpp @@ -973,7 +973,9 @@ nsProfile::SetCurrentProfile(const PRUnichar * aCurrentProfile) NS_ENSURE_TRUE(observerService, NS_ERROR_FAILURE); nsISupports *subject = (nsISupports *)((nsIProfile *)this); - const nsAFlatString& context = isSwitch ? NS_LITERAL_STRING("switch") : NS_LITERAL_STRING("startup"); + NS_NAMED_LITERAL_STRING(switchString, "switch"); + NS_NAMED_LITERAL_STRING(startupString, "startup"); + const nsAFlatString& context = isSwitch ? switchString : startupString; if (isSwitch) { @@ -1050,7 +1052,10 @@ NS_IMETHODIMP nsProfile::ShutDownCurrentProfile(PRUint32 shutDownType) NS_ENSURE_TRUE(observerService, NS_ERROR_FAILURE); nsISupports *subject = (nsISupports *)((nsIProfile *)this); - const nsAFlatString& context = (shutDownType == SHUTDOWN_CLEANSE) ? NS_LITERAL_STRING("shutdown-cleanse") : NS_LITERAL_STRING("shutdown-persist"); + + NS_NAMED_LITERAL_STRING(cleanseString, "shutdown-cleanse"); + NS_NAMED_LITERAL_STRING(persistString, "shutdown-persist"); + const nsAFlatString& context = (shutDownType == SHUTDOWN_CLEANSE) ? cleanseString : persistString; // Phase 1: See if anybody objects to the profile being changed. mProfileChangeVetoed = PR_FALSE;