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

Unified Diff: core/fpdfapi/edit/fpdf_edit_create.cpp

Issue 2419173002: Update CPDF_IndirectObjectHolder APIs for unique objects (Closed)
Patch Set: Fix issues Created 4 years, 2 months 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 | « core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp ('k') | core/fpdfapi/page/cpdf_docpagedata.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/edit/fpdf_edit_create.cpp
diff --git a/core/fpdfapi/edit/fpdf_edit_create.cpp b/core/fpdfapi/edit/fpdf_edit_create.cpp
index fae2b14449c419e90ee787760607c13a28674c8a..5622b1dae7b33210ce0325bdb80994b4ca51a753 100644
--- a/core/fpdfapi/edit/fpdf_edit_create.cpp
+++ b/core/fpdfapi/edit/fpdf_edit_create.cpp
@@ -1244,12 +1244,10 @@ int32_t CPDF_Creator::WriteOldIndirectObject(uint32_t objnum) {
m_ObjectOffset[objnum] = 0;
return 0;
}
- if (WriteIndirectObj(pObj)) {
+ if (WriteIndirectObj(pObj))
return -1;
- }
- if (!bExistInMap) {
- m_pDocument->ReleaseIndirectObject(objnum);
- }
+ if (!bExistInMap)
+ m_pDocument->DeleteIndirectObject(objnum);
} else {
uint8_t* pBuffer;
uint32_t size;
« no previous file with comments | « core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp ('k') | core/fpdfapi/page/cpdf_docpagedata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698