summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/fx_codec_progress.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-31 15:18:28 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-31 22:49:33 +0000
commitfc04f41200e4ba4f47f52f188708547e8a1bee6d (patch)
tree93e09a89b3dac5a3801be2e0820bc77adecd8f60 /core/fxcodec/codec/fx_codec_progress.cpp
parentd9dc962586d17ab113f1ad3abefc0fa2758c9d26 (diff)
downloadpdfium-fc04f41200e4ba4f47f52f188708547e8a1bee6d.tar.xz
Move all of ccodec_bmpmodule state to its context
This avoids a stale delegate pointer issue in the module. In theory, it should also allow for multiple decodes at the same time from different contexts within the same module, but this isn't used. Rename associated context, and use |new| to create it. Along the way, resolve a subtle FX_Alloc() vs. user-supplied callback free() issue, and remove supporting code. Bug: 728323 Change-Id: I7bb66bb5d5b4fa173bec2b445a8e71ab691fdf5c Reviewed-on: https://pdfium-review.googlesource.com/6133 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/fx_codec_progress.cpp')
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index dba0e20533..4cadb152d8 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -1020,8 +1020,7 @@ bool CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
m_status = FXCODEC_STATUS_ERR_MEMORY;
return false;
}
- pBmpModule->SetDelegate(this);
- m_pBmpContext = pBmpModule->Start();
+ m_pBmpContext = pBmpModule->Start(this);
if (!m_pBmpContext) {
m_status = FXCODEC_STATUS_ERR_MEMORY;
return false;