mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 14:44:26 +00:00
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:
parent
221d69205f
commit
3913348852
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user