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

Unified Diff: core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp

Issue 1142713005: Remove FX_Alloc() null checks now that it can't return NULL. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix missing FX_Alloc2D, check overflow on add, remove unused enum. 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/agg/agg23/fx_agg_path_storage.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp
diff --git a/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp b/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp
index 634d10a3bef2d32542b71b572ec50a133593eac7..1c32d96cabd4140daa73f7aca1a61a79404685e3 100644
--- a/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp
+++ b/core/src/fxge/agg/agg23/fx_agg_rasterizer_scanline_aa.cpp
@@ -117,9 +117,6 @@ void outline_aa::allocate_block()
if(m_cur_block >= m_num_blocks) {
if(m_num_blocks >= m_max_blocks) {
cell_aa** new_cells = FX_Alloc( cell_aa*, m_max_blocks + cell_block_pool);
- if (!new_cells) {
- return;
- }
if(m_cells) {
FXSYS_memcpy32(new_cells, m_cells, m_max_blocks * sizeof(cell_aa*));
FX_Free(m_cells);
@@ -128,9 +125,6 @@ void outline_aa::allocate_block()
m_max_blocks += cell_block_pool;
}
m_cells[m_num_blocks++] = FX_Alloc(cell_aa, cell_block_size);
- if (!m_cells[m_num_blocks - 1]) {
- return;
- }
}
m_cur_cell_ptr = m_cells[m_cur_block++];
}
« no previous file with comments | « core/src/fxge/agg/agg23/fx_agg_path_storage.cpp ('k') | core/src/fxge/dib/fx_dib_composite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698