Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration its functions are just wrappers for malloc() et al. (Indeed, in some places we mix PR_Malloc() with free(), or malloc() with PR_Free().) This patch removes all uses, except for the places where we need to use PR_Free() to free something allocated by another NSPR function; in those cases I've added a comment explaining which function did the allocation.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#endif
|
||||
|
||||
#include "mozilla/Logging.h"
|
||||
#include "prmem.h"
|
||||
#include "nscore.h"
|
||||
#include "prenv.h"
|
||||
|
||||
@@ -167,7 +166,7 @@ nsNPAPIPluginInstance::~nsNPAPIPluginInstance()
|
||||
#endif
|
||||
|
||||
if (mMIMEType) {
|
||||
PR_Free((void *)mMIMEType);
|
||||
free(mMIMEType);
|
||||
mMIMEType = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user