Merge to XFA: Change FX_Alloc to FX_Try_Alloc in _JpegEncode
authorJUN FANG <jun_fang@foxitsoftware.com>
Mon, 18 May 2015 21:36:00 +0000 (14:36 -0700)
committerJUN FANG <jun_fang@foxitsoftware.com>
Mon, 18 May 2015 21:50:24 +0000 (14:50 -0700)
commit34d839653f3c7a821dadb8e3219f9a8da83d83e6
tree5e7c266b89e183283d761e154ed58ed31ab88211
parent038cd084817aca8017255a6b3782fcba2688d2cb
Merge to XFA: Change FX_Alloc to FX_Try_Alloc in _JpegEncode

This CL is used for:
1. keeping the same logic as before (the behaviour
   of FX_Alloc was changed for OOM).
2. fixing a potential integer overflow.

BUG=N/A
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1126013006
core/src/fxcodec/codec/fx_codec_jpeg.cpp