summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffapp.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-04 14:37:18 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-04 21:48:48 +0000
commitafd0d1f488ea55da545b3310fd8f22e45522a695 (patch)
tree89136eba4669421b6f828edb9f3d69ee558110d0 /xfa/fxfa/cxfa_ffapp.cpp
parent4f8b044b95dc282959dfe41453e2a9c1ec7e9354 (diff)
downloadpdfium-afd0d1f488ea55da545b3310fd8f22e45522a695.tar.xz
RefCount CPDF_StreamAcc all the time.
Pass stream argument to constructor; it feels like a stream accessor should always be made from a stream rather than passing one in after the fact. Change-Id: Iaa46cb37677b81f0170f5d39bab76ad38ea4af44 Reviewed-on: https://pdfium-review.googlesource.com/3620 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffapp.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffapp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp
index 78de94e938..7b88626c91 100644
--- a/xfa/fxfa/cxfa_ffapp.cpp
+++ b/xfa/fxfa/cxfa_ffapp.cpp
@@ -35,13 +35,13 @@ class CXFA_FileRead : public IFX_SeekableReadStream {
bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
private:
- std::vector<std::unique_ptr<CPDF_StreamAcc>> m_Data;
+ std::vector<CFX_RetainPtr<CPDF_StreamAcc>> m_Data;
};
CXFA_FileRead::CXFA_FileRead(const std::vector<CPDF_Stream*>& streams) {
for (CPDF_Stream* pStream : streams) {
- m_Data.push_back(pdfium::MakeUnique<CPDF_StreamAcc>());
- m_Data.back()->LoadAllData(pStream);
+ m_Data.push_back(pdfium::MakeRetain<CPDF_StreamAcc>(pStream));
+ m_Data.back()->LoadAllData();
}
}