diff options
author | Lei Zhang <thestig@chromium.org> | 2015-05-06 15:09:06 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-05-06 15:09:06 -0700 |
commit | 2c4104443f5a7aea225bd853770cdc11ab431932 (patch) | |
tree | 1a2b640d07a4501c7409f9ad5a6323971f813365 /core/src/fxcodec/lgif | |
parent | 5734d862cb22eca6e9644ea7d1c096d70123434f (diff) | |
download | pdfium-2c4104443f5a7aea225bd853770cdc11ab431932.tar.xz |
Merge to XFA: Replace FX_NEW with new, remote tests from fxcodec
Review URL: https://codereview.chromium.org/1084303002
(cherry picked from commit cfc1a654ef3e8b65bc447815d35932c185bf1422)
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1125363002
Diffstat (limited to 'core/src/fxcodec/lgif')
-rw-r--r-- | core/src/fxcodec/lgif/fx_gif.cpp | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/core/src/fxcodec/lgif/fx_gif.cpp b/core/src/fxcodec/lgif/fx_gif.cpp index 8f5794e786..08c1803e8a 100644 --- a/core/src/fxcodec/lgif/fx_gif.cpp +++ b/core/src/fxcodec/lgif/fx_gif.cpp @@ -342,27 +342,12 @@ gif_decompress_struct_p _gif_create_decompress() }
FXSYS_memset32(gif_ptr, 0, sizeof(gif_decompress_struct));
gif_ptr->decode_status = GIF_D_STATUS_SIG;
- gif_ptr->img_ptr_arr_ptr = FX_NEW CFX_ArrayTemplate<GifImage*>;
- if(gif_ptr->img_ptr_arr_ptr == NULL) {
- FX_Free(gif_ptr);
- return NULL;
- }
+ gif_ptr->img_ptr_arr_ptr = new CFX_ArrayTemplate<GifImage*>;
#ifdef GIF_SUPPORT_COMMENT_EXTENSION
- gif_ptr->cmt_data_ptr = FX_NEW CFX_ByteString;
- if(gif_ptr->cmt_data_ptr == NULL) {
- delete gif_ptr->img_ptr_arr_ptr;
- FX_Free(gif_ptr);
- return NULL;
- }
+ gif_ptr->cmt_data_ptr = new CFX_ByteString;
#endif
#ifdef GIF_SUPPORT_PLAIN_TEXT_EXTENSION
- gif_ptr->pt_ptr_arr_ptr = FX_NEW CFX_ArrayTemplate<GifPlainText*>;
- if(gif_ptr->pt_ptr_arr_ptr == NULL) {
- delete(gif_ptr->cmt_data_ptr);
- delete gif_ptr->img_ptr_arr_ptr;
- FX_Free(gif_ptr);
- return NULL;
- }
+ gif_ptr->pt_ptr_arr_ptr = new CFX_ArrayTemplate<GifPlainText*>;
#endif
return gif_ptr;
}
@@ -443,11 +428,7 @@ gif_compress_struct_p _gif_create_compress() return NULL;
}
FXSYS_memset32(gif_ptr, 0, sizeof(gif_compress_struct));
- gif_ptr->img_encoder_ptr = FX_NEW CGifLZWEncoder;
- if (gif_ptr->img_encoder_ptr == NULL) {
- FX_Free(gif_ptr);
- return NULL;
- }
+ gif_ptr->img_encoder_ptr = new CGifLZWEncoder;
gif_ptr->header_ptr = (GifHeader*)FX_Alloc(FX_BYTE, sizeof(GifHeader));
if (gif_ptr->header_ptr == NULL) {
delete(gif_ptr->img_encoder_ptr);
@@ -800,7 +781,7 @@ FX_INT32 _gif_decode_extension(gif_decompress_struct_p gif_ptr) _gif_takeover_gce_ptr(gif_ptr, &gif_pt_ptr->gce_ptr);
gif_pt_ptr->pte_ptr = (GifPTE*)FX_Alloc(FX_BYTE, sizeof(GifPTE));
GIF_PTR_NOT_NULL(gif_pt_ptr->pte_ptr, gif_ptr);
- gif_pt_ptr->string_ptr = FX_NEW CFX_ByteString;
+ gif_pt_ptr->string_ptr = new CFX_ByteString;
GIF_PTR_NOT_NULL(gif_pt_ptr->string_ptr, gif_ptr);
gif_pt_ptr->pte_ptr->block_size = gif_pte_ptr->block_size;
gif_pt_ptr->pte_ptr->grid_left = _GetWord_LSBFirst((FX_LPBYTE)&gif_pte_ptr->grid_left);
@@ -1036,7 +1017,7 @@ FX_INT32 _gif_load_frame(gif_decompress_struct_p gif_ptr, FX_INT32 frame_num) }
}
if(gif_ptr->img_decoder_ptr == NULL) {
- gif_ptr->img_decoder_ptr = FX_NEW CGifLZWDecoder(gif_ptr->err_ptr);
+ gif_ptr->img_decoder_ptr = new CGifLZWDecoder(gif_ptr->err_ptr);
GIF_PTR_NOT_NULL(gif_ptr->img_decoder_ptr, gif_ptr);
}
gif_ptr->img_decoder_ptr->InitTable(gif_image_ptr->image_code_size);
|