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

Unified Diff: core/src/fxge/dib/fx_dib_main.cpp

Issue 1128043009: Abort on OOM by default in FX_Alloc() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, 2015. Created 5 years, 7 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/fxge/dib/fx_dib_engine.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/dib/fx_dib_main.cpp
diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index 59c0bd674924a799e679329cc7be95f5a4c6466f..a54c9abed045d19c0492d3789e2ee1443270d84b 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -84,7 +84,7 @@ FX_BOOL CFX_DIBitmap::Create(int width, int height, FXDIB_Format format, FX_LPBY
int size = pitch * height + 4;
int oomlimit = _MAX_OOM_LIMIT_;
if (oomlimit >= 0 && size >= oomlimit) {
- m_pBuffer = FX_AllocNL(FX_BYTE, size);
+ m_pBuffer = FX_TryAlloc(FX_BYTE, size);
} else {
m_pBuffer = FX_Alloc(FX_BYTE, size);
}
« no previous file with comments | « core/src/fxge/dib/fx_dib_engine.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698