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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp

Issue 2353093002: Assert that dictionary can own the objects it is given. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | core/fpdfdoc/cpdf_formfield_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
index cc395a2e089d7634d99331844e59d74a0fac50bf..aeee3382f948326597163f07c7f5e9153e17c436 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
@@ -169,6 +169,7 @@ bool CPDF_Dictionary::IsSignatureDict() const {
}
void CPDF_Dictionary::SetFor(const CFX_ByteString& key, CPDF_Object* pObj) {
+ ASSERT(!pObj || pObj->GetObjNum() == 0);
auto it = m_Map.find(key);
if (it == m_Map.end()) {
if (pObj)
« no previous file with comments | « no previous file | core/fpdfdoc/cpdf_formfield_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698