зеркало из https://github.com/mozilla/pjs.git
Fix gcc 2.7.2.3 crash on startup (orange on speedracer and worms tinderboxes). gcc 2.7.2.3 doesn't seem to follow the rule in C++ 12.2, clause 5, on the lifetime of temporaries bound to references.
This commit is contained in:
Родитель
7a4ed2c26f
Коммит
3ff25e7956
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче