summaryrefslogtreecommitdiff
path: root/core/src/fxge/apple/fx_quartz_device.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-16 09:13:02 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-16 09:13:02 -0700
commit3f754d483e257f0d373be28a64b58620b4e0953f (patch)
tree51dbd10bcfc25572ab5a6a70eba2eab0f6bf3131 /core/src/fxge/apple/fx_quartz_device.cpp
parent026623249c78ba305c874cc093a035ef5a4cd1b4 (diff)
downloadpdfium-3f754d483e257f0d373be28a64b58620b4e0953f.tar.xz
Remove checks in fxge/{apple,win32,skia,dib} now that FX_NEW cant return 0
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1062863006
Diffstat (limited to 'core/src/fxge/apple/fx_quartz_device.cpp')
-rw-r--r--core/src/fxge/apple/fx_quartz_device.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index 050d8744bd..f7faee15b3 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -1097,10 +1097,7 @@ FX_BOOL CFX_QuartzDevice::Attach(CGContextRef context, FX_INT32 nDeviceClass)
}
m_pContext = context;
CGContextRetain(m_pContext);
- IFX_RenderDeviceDriver* pDriver = FX_NEW CFX_QuartzDeviceDriver(m_pContext, nDeviceClass);
- if (!pDriver) {
- return FALSE;
- }
+ IFX_RenderDeviceDriver* pDriver = new CFX_QuartzDeviceDriver(m_pContext, nDeviceClass);
SetDeviceDriver(pDriver);
return TRUE;
}
@@ -1111,10 +1108,7 @@ FX_BOOL CFX_QuartzDevice::Attach(CFX_DIBitmap* pBitmap)
if (NULL == m_pContext) {
return FALSE;
}
- IFX_RenderDeviceDriver* pDriver = FX_NEW CFX_QuartzDeviceDriver(m_pContext, FXDC_DISPLAY);
- if (!pDriver) {
- return FALSE;
- }
+ IFX_RenderDeviceDriver* pDriver = new CFX_QuartzDeviceDriver(m_pContext, FXDC_DISPLAY);
SetDeviceDriver(pDriver);
return TRUE;
}
@@ -1123,10 +1117,7 @@ FX_BOOL CFX_QuartzDevice::Create(FX_INT32 width, FX_INT32 height, FXDIB_Format f
if ((FX_BYTE)format < 32) {
return FALSE;
}
- CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap;
- if (!pBitmap) {
- return FALSE;
- }
+ CFX_DIBitmap* pBitmap = new CFX_DIBitmap;
if (!pBitmap->Create(width, height, format)) {
delete pBitmap;
return FALSE;