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:36:00 +0000 (14:36 -0700)
commit0c94bc477b5374fea34994c00fb4de291964489e
tree63475f976a497e468354a3ebfd582d1153cb453d
parent31b3a2b31a50f83ed100e01485013fd871399f45
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