summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 8bcdcdda31..01328f2374 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -4924,7 +4924,7 @@ void CXFA_FM2JSContext::Get(CFXJSE_Value* pThis,
std::unique_ptr<CFXJSE_Value> argOne = GetSimpleValue(pThis, args, 0);
CFX_ByteString urlString;
ValueToUTF8String(argOne.get(), urlString);
- IFX_SeekableReadStream* pFile = pAppProvider->DownloadURL(
+ CFX_RetainPtr<IFX_SeekableReadStream> pFile = pAppProvider->DownloadURL(
CFX_WideString::FromUTF8(urlString.AsStringC()));
if (!pFile)
return;
@@ -4933,7 +4933,6 @@ void CXFA_FM2JSContext::Get(CFXJSE_Value* pThis,
std::unique_ptr<uint8_t> pData(FX_Alloc(uint8_t, size));
pFile->ReadBlock(pData.get(), size);
args.GetReturnValue()->SetString(CFX_ByteStringC(pData.get(), size));
- pFile->Release();
}
// static