summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_pngmodule.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-30 15:29:21 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-30 23:37:33 +0000
commit26cb2fa42b1a90146f9ab5c0b83ee8b48703baf4 (patch)
treee924e7eacb5b229a2c11f857d9232b41a82c2851 /core/fxcodec/codec/ccodec_pngmodule.h
parent2c200030b55faebbea7d7b30aba7ff7c5791b699 (diff)
downloadpdfium-26cb2fa42b1a90146f9ab5c0b83ee8b48703baf4.tar.xz
Use unowned ptr back to delegates in codec moduleschromium/3117
Change-Id: I8e31305dcf888665cb0656ac518f07541566b177 Reviewed-on: https://pdfium-review.googlesource.com/6084 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_pngmodule.h')
-rw-r--r--core/fxcodec/codec/ccodec_pngmodule.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fxcodec/codec/ccodec_pngmodule.h b/core/fxcodec/codec/ccodec_pngmodule.h
index f0a08db66c..2b43f5d8bc 100644
--- a/core/fxcodec/codec/ccodec_pngmodule.h
+++ b/core/fxcodec/codec/ccodec_pngmodule.h
@@ -7,6 +7,7 @@
#ifndef CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_
#define CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_system.h"
class CFX_DIBAttribute;
@@ -38,11 +39,11 @@ class CCodec_PngModule {
uint32_t src_size,
CFX_DIBAttribute* pAttribute);
- Delegate* GetDelegate() const { return m_pDelegate; }
+ Delegate* GetDelegate() const { return m_pDelegate.Get(); }
void SetDelegate(Delegate* delegate) { m_pDelegate = delegate; }
protected:
- Delegate* m_pDelegate;
+ CFX_UnownedPtr<Delegate> m_pDelegate;
char m_szLastError[PNG_ERROR_SIZE];
};