mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 801466 - part 3.1 remove some prmem usage from dom/ and content/ r=mounir
This commit is contained in:
parent
4928373991
commit
d2a9c007b8
@ -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"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "Layers.h"
|
||||
#include "ImageContainer.h"
|
||||
#include "ImageTypes.h"
|
||||
#include "prmem.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "AndroidBridge.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
#ifndef MEDIAENGINEDEFAULT_H_
|
||||
#define MEDIAENGINEDEFAULT_H_
|
||||
|
||||
#include "prmem.h"
|
||||
#include "nsITimer.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
#ifndef MEDIAENGINEWEBRTC_H_
|
||||
#define MEDIAENGINEWEBRTC_H_
|
||||
|
||||
#include "prmem.h"
|
||||
#include "prcvar.h"
|
||||
#include "prthread.h"
|
||||
#include "nsIThread.h"
|
||||
|
@ -7,7 +7,6 @@
|
||||
#define txLog_h__
|
||||
|
||||
#include "prlog.h"
|
||||
#include "prmem.h"
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -161,7 +161,6 @@
|
||||
#include "nsIJARChannel.h"
|
||||
|
||||
#include "prlog.h"
|
||||
#include "prmem.h"
|
||||
|
||||
#include "nsISelectionDisplay.h"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsDependentString.h"
|
||||
#include "prmem.h"
|
||||
#include "nsArrayEnumerator.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user