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

Unified Diff: core/src/fxge/win32/fx_win32_print.cpp

Issue 1062863006: Remove checks in fxge/{apple,win32,skia,dib} now that FX_NEW cant return 0 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 8 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/win32/fx_win32_gdipext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/win32/fx_win32_print.cpp
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 9e7a0aae959efecccb059585cc5e1c1be333a246..7dc48a1808f25922ff3bdc160554d1a4ee6ca305 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -143,13 +143,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af
CPDF_FixedMatrix result2src_fix(result2src, 8);
int result_width = result_rect.Width();
int result_height = result_rect.Height();
- CFX_DIBitmap* pTempBitmap = FX_NEW CFX_DIBitmap;
- if (!pTempBitmap) {
- if (pSrcBitmap != src_bitmap) {
- delete pSrcBitmap;
- }
- return NULL;
- }
+ CFX_DIBitmap* pTempBitmap = new CFX_DIBitmap;
if (!pTempBitmap->Create(result_width, result_height, pSrc->GetFormat())) {
delete pTempBitmap;
if (pSrcBitmap != src_bitmap) {
@@ -291,10 +285,7 @@ FX_BOOL CPSPrinterDriver::Init(HDC hDC, int pslevel, FX_BOOL bCmykOutput)
m_Width = ::GetDeviceCaps(m_hDC, HORZRES);
m_Height = ::GetDeviceCaps(m_hDC, VERTRES);
m_nBitsPerPixel = ::GetDeviceCaps(m_hDC, BITSPIXEL);
- m_pPSOutput = FX_NEW CPSOutput(hDC);
- if (!m_pPSOutput) {
- return FALSE;
- }
+ m_pPSOutput = new CPSOutput(hDC);
((CPSOutput*)m_pPSOutput)->Init();
m_PSRenderer.Init(m_pPSOutput, pslevel, m_Width, m_Height, bCmykOutput);
m_bCmykOutput = bCmykOutput;
« no previous file with comments | « core/src/fxge/win32/fx_win32_gdipext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698