Bug 1171309 - Remove PREF_Init()'s return value. r=bsmedberg.

This is now possible because PLDHashTable initialization is infallible.
This commit is contained in:
Nicholas Nethercote 2015-06-04 16:14:48 -07:00
parent 0019b45ad0
commit 83659b394f
3 changed files with 4 additions and 7 deletions

View File

@ -523,8 +523,7 @@ Preferences::Init()
{
nsresult rv;
rv = PREF_Init();
NS_ENSURE_SUCCESS(rv, rv);
PREF_Init();
rv = pref_InitInitialObjects();
NS_ENSURE_SUCCESS(rv, rv);
@ -644,8 +643,7 @@ Preferences::ResetPrefs()
NotifyServiceObservers(NS_PREFSERVICE_RESET_TOPIC_ID);
PREF_CleanupPrefs();
nsresult rv = PREF_Init();
NS_ENSURE_SUCCESS(rv, rv);
PREF_Init();
return pref_InitInitialObjects();
}

View File

@ -147,7 +147,7 @@ static nsresult pref_HashPref(const char *key, PrefValue value, PrefType type, u
#define PREF_HASHTABLE_INITIAL_LENGTH 1024
nsresult PREF_Init()
void PREF_Init()
{
if (!gHashTable) {
gHashTable = new PLDHashTable(&pref_HashTableOps,
@ -157,7 +157,6 @@ nsresult PREF_Init()
PL_INIT_ARENA_POOL(&gPrefNameArena, "PrefNameArena",
PREFNAME_ARENA_SIZE);
}
return NS_OK;
}
/* Frees the callback list. */

View File

@ -42,7 +42,7 @@ struct PrefHashEntry : PLDHashEntryHdr
// the preference hashtable.
// </font>
*/
nsresult PREF_Init();
void PREF_Init();
/*
// Cleanup should be called at program exit to free the