summaryrefslogtreecommitdiff
path: root/core/fxcodec/lgif/cgifcontext.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-23 19:07:25 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-23 23:30:17 +0000
commit6f3593c5cdf62915fc086448312671ce1fce5291 (patch)
tree14bb1e913dad31e80db2ae588f531603e93bea4b /core/fxcodec/lgif/cgifcontext.h
parenta861a7b4696e0ffd4be73c63d7ed3611e461b1c1 (diff)
downloadpdfium-6f3593c5cdf62915fc086448312671ce1fce5291.tar.xz
Remove longjmp from the Gif module
The Gif module is only using the longjmp as a way to catch errors, so this CL makes it use GifDecodeStatus::Error instead. Change-Id: I9c97e63ed851d2a80e38f1d2cd9e8f297d608cb2 Reviewed-on: https://pdfium-review.googlesource.com/5850 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/lgif/cgifcontext.h')
-rw-r--r--core/fxcodec/lgif/cgifcontext.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/fxcodec/lgif/cgifcontext.h b/core/fxcodec/lgif/cgifcontext.h
index e65d6c7b0b..08a66c18e2 100644
--- a/core/fxcodec/lgif/cgifcontext.h
+++ b/core/fxcodec/lgif/cgifcontext.h
@@ -7,7 +7,6 @@
#ifndef CORE_FXCODEC_LGIF_CGIFCONTEXT_H_
#define CORE_FXCODEC_LGIF_CGIFCONTEXT_H_
-#include <setjmp.h>
#include <memory>
#include <vector>
@@ -21,8 +20,7 @@ class CGifContext {
CGifContext(CCodec_GifModule* gif_module, char* error_string);
~CGifContext();
- // TODO(npm): Remove longjmp from this method!!!
- void ThrowError(const char* err_msg);
+ void AddError(const char* err_msg);
void RecordCurrentPosition(uint32_t* cur_pos_ptr);
void ReadScanline(int32_t row_num, uint8_t* row_buf);
bool GetRecordPosition(uint32_t cur_pos,
@@ -38,7 +36,6 @@ class CGifContext {
int32_t disposal_method,
bool interlace);
- jmp_buf jmpbuf;
std::vector<GifPalette> m_GlobalPalette;
int32_t global_pal_num;
uint32_t img_row_offset;