Followup to bug 541446 - nsIEnvironment.set will intentionally leak a string when you call it because that is required by the PR_SetEnv API. Make that string something which is not tracked by our leak detector

--HG--
extra : rebase_source : 2bdaf8d6ce3a8d093c107eeb9a4b2d4643ba0136
This commit is contained in:
Benjamin Smedberg 2010-02-10 12:57:46 -05:00
parent 221d69205f
commit 3913348852

View File

@ -137,7 +137,7 @@ nsEnvironment::Get(const nsAString& aName, nsAString& aOutValue)
* vars.
*/
typedef nsBaseHashtableET<nsCStringHashKey,char*> EnvEntryType;
typedef nsBaseHashtableET<nsCharPtrHashKey,char*> EnvEntryType;
typedef nsTHashtable<EnvEntryType> EnvHashType;
static EnvHashType *gEnvHash = nsnull;
@ -178,7 +178,7 @@ nsEnvironment::Set(const nsAString& aName, const nsAString& aValue)
return NS_ERROR_UNEXPECTED;
}
EnvEntryType* entry = gEnvHash->PutEntry(nativeName);
EnvEntryType* entry = gEnvHash->PutEntry(nativeName.get());
if (!entry) {
return NS_ERROR_OUT_OF_MEMORY;
}