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

Unified Diff: fpdfsdk/fpdfppo.cpp

Issue 2345063002: Use string pools in some dictionaries (Closed)
Patch Set: Address Dan's concern about outliving document Created 4 years, 3 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
Index: fpdfsdk/fpdfppo.cpp
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index d901a6114304cfceb1e0c79aeb0b5de5efb86388..0a3e9714cef8d6f4aa53fe14437f67be48c8094e 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -70,7 +70,7 @@ FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document* pDestPDFDoc,
CPDF_Dictionary* pNewPages =
pElement ? ToDictionary(pElement->GetDirect()) : nullptr;
if (!pNewPages) {
- pNewPages = new CPDF_Dictionary;
+ pNewPages = new CPDF_Dictionary(pDestPDFDoc->GetByteStringPool());
pNewRoot->SetReferenceFor("Pages", pDestPDFDoc,
pDestPDFDoc->AddIndirectObject(pNewPages));
}

Powered by Google App Engine
This is Rietveld 408576698