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

Unified Diff: core/src/fxge/win32/fx_win32_gdipext.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: Fix missing |new| typo. 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_dwrite.cpp ('k') | core/src/fxge/win32/fx_win32_print.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/win32/fx_win32_gdipext.cpp
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index e668b492002467e1f267d0044e7becd60e3cfcd9..fae1883f4d3c4d9ea1b81db7f8e6ce503b0112c2 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -302,10 +302,7 @@ static CFX_DIBitmap* _StretchMonoToGray(int dest_width, int dest_height,
int result_width = pClipRect->Width();
int result_height = pClipRect->Height();
int result_pitch = (result_width + 3) / 4 * 4;
- CFX_DIBitmap* pStretched = FX_NEW CFX_DIBitmap;
- if (!pStretched) {
- return NULL;
- }
+ CFX_DIBitmap* pStretched = new CFX_DIBitmap;
if (!pStretched->Create(result_width, result_height, FXDIB_8bppRgb)) {
delete pStretched;
return NULL;
@@ -1164,10 +1161,7 @@ static PREVIEW3_DIBITMAP* LoadDIBitmap(WINDIB_Open_Args_ args)
if (args.memory_size == 0 || !args.memory_base) {
return NULL;
}
- pStream = FX_NEW GpStream;
- if (!pStream) {
- return NULL;
- }
+ pStream = new GpStream;
pStream->Write(args.memory_base, (ULONG)args.memory_size, NULL);
status = CallFunc(GdipCreateBitmapFromStreamICM)(pStream, &pBitmap);
}
« no previous file with comments | « core/src/fxge/win32/fx_win32_dwrite.cpp ('k') | core/src/fxge/win32/fx_win32_print.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698