Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: xfa/fxfa/fm2js/xfa_fm2jscontext.cpp

Issue 2451493002: Refcount all the IFX_ stream classes all the time. (Closed)
Patch Set: Clean up cast expression Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidget.cpp ('k') | xfa/fxfa/fxfa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 8bcdcdda3174987f0734bb39da85faaca852108d..01328f2374622ad829fd4b5ef2ce43ccba100292 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
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidget.cpp ('k') | xfa/fxfa/fxfa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698