From 5f34d479d06ebab9079c2d0704dee872cc45dd86 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 1 Jun 2017 10:18:53 -0700 Subject: Move CCodec_GifModule state to CGifContext Introduce a base CCodec_GifModule::Context class with a virtual destructor so holders of unique_ptr's to these can delete them without actually having any knowledge of the implementation details of the context. Bug: 728669 Change-Id: Ia50f94300924a1053c326984eac3b03f25f1b83c Reviewed-on: https://pdfium-review.googlesource.com/6190 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fxcodec/codec/fx_codec_progress.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/fxcodec/codec/fx_codec_progress.cpp') diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp index f65235139d..a11ba4405e 100644 --- a/core/fxcodec/codec/fx_codec_progress.cpp +++ b/core/fxcodec/codec/fx_codec_progress.cpp @@ -1160,8 +1160,7 @@ bool CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType, m_status = FXCODEC_STATUS_ERR_MEMORY; return false; } - pGifModule->SetDelegate(this); - m_pGifContext = pGifModule->Start(); + m_pGifContext = pGifModule->Start(this); bool bResult = m_pFile->ReadBlock(m_pSrcBuf, 0, size); if (!bResult) { m_status = FXCODEC_STATUS_ERR_READ; -- cgit v1.2.3