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

Unified Diff: core/fpdfapi/parser/cfdf_document.cpp

Issue 2477003002: Pass object to ReplaceIndirectObjectIfHigherGeneration() by unique_ptr. (Closed)
Patch Set: Fix issuse Created 4 years, 1 month 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 | « no previous file | core/fpdfapi/parser/cpdf_array_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cfdf_document.cpp
diff --git a/core/fpdfapi/parser/cfdf_document.cpp b/core/fpdfapi/parser/cfdf_document.cpp
index e66bfeb12b30be63f2b48235011d57c338941fb6..a0f3e1490daa16c12ddeba85e4ac98fc9cf83daf 100644
--- a/core/fpdfapi/parser/cfdf_document.cpp
+++ b/core/fpdfapi/parser/cfdf_document.cpp
@@ -69,11 +69,12 @@ void CFDF_Document::ParseStream(IFX_SeekableReadStream* pFile, bool bOwnFile) {
if (word != "obj")
break;
- CPDF_Object* pObj = parser.GetObject(this, objnum, 0, true);
+ auto pObj = pdfium::WrapUnique<CPDF_Object>(
+ parser.GetObject(this, objnum, 0, true));
if (!pObj)
break;
- ReplaceIndirectObjectIfHigherGeneration(objnum, pObj);
+ ReplaceIndirectObjectIfHigherGeneration(objnum, std::move(pObj));
word = parser.GetNextWord(nullptr);
if (word != "endobj")
break;
« no previous file with comments | « no previous file | core/fpdfapi/parser/cpdf_array_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698