Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2512)

Unified Diff: core/src/fxcrt/fxcrt_posix.cpp

Issue 372473003: Remove custom memory manager (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Change malloc to calloc Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcrt/fxcrt_posix.h ('k') | core/src/fxcrt/fxcrt_windows.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fxcrt_posix.cpp
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index 558f33466b6ea17949e2376e153732fcb7ad3800..98f9a71c6c163bc4662deb7b8651f7c8ff22ea33 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -7,13 +7,9 @@
#include "../../include/fxcrt/fx_ext.h"
#include "fxcrt_posix.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
-IFXCRT_FileAccess* FXCRT_FileAccess_Create(IFX_Allocator* pAllocator)
+IFXCRT_FileAccess* FXCRT_FileAccess_Create()
{
- if (pAllocator) {
- return FX_NewAtAllocator(pAllocator) CFXCRT_FileAccess_Posix();
- } else {
- return FX_NEW CFXCRT_FileAccess_Posix;
- }
+ return FX_NEW CFXCRT_FileAccess_Posix;
}
void FXCRT_Posix_GetFileMode(FX_DWORD dwModes, FX_INT32 &nFlags, FX_INT32 &nMasks)
{
@@ -59,13 +55,9 @@ void CFXCRT_FileAccess_Posix::Close()
close(m_nFD);
m_nFD = -1;
}
-void CFXCRT_FileAccess_Posix::Release(IFX_Allocator* pAllocator)
+void CFXCRT_FileAccess_Posix::Release()
{
- if (pAllocator) {
- FX_DeleteAtAllocator(this, pAllocator, CFXCRT_FileAccess_Posix);
- } else {
- delete this;
- }
+ delete this;
}
FX_FILESIZE CFXCRT_FileAccess_Posix::GetSize() const
{
« no previous file with comments | « core/src/fxcrt/fxcrt_posix.h ('k') | core/src/fxcrt/fxcrt_windows.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698