bug 801466 - part 3.1 remove some prmem usage from dom/ and content/ r=mounir

This commit is contained in:
Trevor Saunders 2012-12-05 02:55:37 -05:00
parent 4928373991
commit d2a9c007b8
10 changed files with 5 additions and 13 deletions

View File

@ -6,7 +6,6 @@
#include <stdio.h>
#include <math.h>
#include "prlog.h"
#include "prmem.h"
#include "prdtoa.h"
#include "AudioStream.h"
#include "nsAlgorithm.h"

View File

@ -10,6 +10,7 @@
#include "Layers.h"
#include "ImageContainer.h"
#include "ImageTypes.h"
#include "prmem.h"
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"

View File

@ -5,7 +5,6 @@
#ifndef MEDIAENGINEDEFAULT_H_
#define MEDIAENGINEDEFAULT_H_
#include "prmem.h"
#include "nsITimer.h"
#include "nsCOMPtr.h"

View File

@ -5,7 +5,6 @@
#ifndef MEDIAENGINEWEBRTC_H_
#define MEDIAENGINEWEBRTC_H_
#include "prmem.h"
#include "prcvar.h"
#include "prthread.h"
#include "nsIThread.h"

View File

@ -7,7 +7,6 @@
#define txLog_h__
#include "prlog.h"
#include "prmem.h"
#endif
#ifdef PR_LOGGING

View File

@ -170,7 +170,7 @@ XULContentSinkImpl::~XULContentSinkImpl()
NS_ASSERTION(mContextStack.Depth() == 0, "Context stack not empty?");
mContextStack.Clear();
PR_FREEIF(mText);
moz_free(mText);
}
//----------------------------------------------------------------------
@ -1051,7 +1051,7 @@ XULContentSinkImpl::AddText(const PRUnichar* aText,
{
// Create buffer when we first need it
if (0 == mTextSize) {
mText = (PRUnichar *) PR_MALLOC(sizeof(PRUnichar) * 4096);
mText = (PRUnichar *) moz_malloc(sizeof(PRUnichar) * 4096);
if (nullptr == mText) {
return NS_ERROR_OUT_OF_MEMORY;
}
@ -1074,7 +1074,7 @@ XULContentSinkImpl::AddText(const PRUnichar* aText,
}
else {
mTextSize += aLength;
mText = (PRUnichar *) PR_REALLOC(mText, sizeof(PRUnichar) * mTextSize);
mText = (PRUnichar *) moz_realloc(mText, sizeof(PRUnichar) * mTextSize);
if (nullptr == mText) {
return NS_ERROR_OUT_OF_MEMORY;
}

View File

@ -161,7 +161,6 @@
#include "nsIJARChannel.h"
#include "prlog.h"
#include "prmem.h"
#include "nsISelectionDisplay.h"

View File

@ -32,7 +32,6 @@
// Helper Classes
#include "nsXPIDLString.h"
#include "nsJSUtils.h"
#include "prmem.h"
#include "jsapi.h" // for JSAutoRequest
#include "jsdbgapi.h" // for JS_ClearWatchPointsForObject
#include "jsfriendapi.h" // for JS_GetGlobalForFrame

View File

@ -191,7 +191,7 @@ ArchiveReaderZipEvent::Exec()
}
// Read the name:
char* filename = (char*)PR_Malloc(filenameLen + 1);
nsAutoArrayPtr<char> filename(new char[filenameLen + 1]);
rv = inputStream->Read(filename, filenameLen, &ret);
if (NS_FAILED(rv) || ret != filenameLen) {
return RunShare(NS_ERROR_UNEXPECTED);
@ -204,8 +204,6 @@ ArchiveReaderZipEvent::Exec()
mFileList.AppendElement(new ArchiveZipItem(filename, centralStruct, mOptions));
}
PR_Free(filename);
// Ignore the rest
seekableStream->Seek(nsISeekableStream::NS_SEEK_CUR, extraLen + commentLen);
}

View File

@ -8,7 +8,6 @@
#include "nsCRT.h"
#include "nsIFile.h"
#include "nsDependentString.h"
#include "prmem.h"
#include "nsArrayEnumerator.h"
#include "mozilla/Preferences.h"