| Index: core/fxcodec/codec/fx_codec_jbig.cpp
|
| diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp
|
| index 8d20894231e8ddabde77046df71f802ac4efa8f9..926541f07dce19289f5b0f6895de880e13d2c56c 100644
|
| --- a/core/fxcodec/codec/fx_codec_jbig.cpp
|
| +++ b/core/fxcodec/codec/fx_codec_jbig.cpp
|
| @@ -14,6 +14,7 @@
|
| #include "core/fxcodec/jbig2/JBig2_Context.h"
|
| #include "core/fxcodec/jbig2/JBig2_Image.h"
|
| #include "core/fxcrt/fx_memory.h"
|
| +#include "third_party/base/ptr_util.h"
|
|
|
| JBig2_DocumentContext::JBig2_DocumentContext() {}
|
|
|
| @@ -22,7 +23,7 @@ JBig2_DocumentContext::~JBig2_DocumentContext() {}
|
| JBig2_DocumentContext* GetJBig2DocumentContext(
|
| std::unique_ptr<JBig2_DocumentContext>* pContextHolder) {
|
| if (!pContextHolder->get())
|
| - pContextHolder->reset(new JBig2_DocumentContext());
|
| + *pContextHolder = pdfium::MakeUnique<JBig2_DocumentContext>();
|
| return pContextHolder->get();
|
| }
|
|
|
| @@ -62,9 +63,9 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(
|
| pJbig2Context->m_dest_pitch = dest_pitch;
|
| pJbig2Context->m_pPause = pPause;
|
| FXSYS_memset(dest_buf, 0, height * dest_pitch);
|
| - pJbig2Context->m_pContext.reset(new CJBig2_Context(
|
| + pJbig2Context->m_pContext = pdfium::MakeUnique<CJBig2_Context>(
|
| global_stream, src_stream, pJBig2DocumentContext->GetSymbolDictCache(),
|
| - pPause, false));
|
| + pPause, false);
|
| if (!pJbig2Context->m_pContext)
|
| return FXCODEC_STATUS_ERROR;
|
|
|
|
|