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

Unified Diff: xfa/fgas/font/cfgas_gefont.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/fgas/font/cfgas_gefont.h ('k') | xfa/fxfa/app/xfa_checksum.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/font/cfgas_gefont.cpp
diff --git a/xfa/fgas/font/cfgas_gefont.cpp b/xfa/fgas/font/cfgas_gefont.cpp
index 1d4624fb0da609fc832401c1c63920cc3147f96a..3bca4dc09fa7cf48efafa095bc9a5516cb0b217b 100644
--- a/xfa/fgas/font/cfgas_gefont.cpp
+++ b/xfa/fgas/font/cfgas_gefont.cpp
@@ -210,12 +210,13 @@ bool CFGAS_GEFont::LoadFontInternal(IFGAS_Stream* pFontStream,
if (bSaveStream)
m_pStream.reset(pFontStream);
- m_pFileRead.reset(pFontStream->MakeSeekableReadStream());
+ m_pFileRead = pFontStream->MakeSeekableReadStream();
m_pFont = new CFX_Font;
- if (m_pFont->LoadFile(m_pFileRead.get()))
- return InitFont();
- m_pFileRead.reset();
- return false;
+ if (!m_pFont->LoadFile(m_pFileRead)) {
+ m_pFileRead.Reset();
+ return false;
+ }
+ return InitFont();
}
#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
« no previous file with comments | « xfa/fgas/font/cfgas_gefont.h ('k') | xfa/fxfa/app/xfa_checksum.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698