From b73c99335bfbd158ad16dd59c9c52396ffd2b54b Mon Sep 17 00:00:00 2001 From: thestig Date: Mon, 3 Oct 2016 21:28:07 -0700 Subject: Revert of Assert that only 0-numbered objects are Released() (patchset #7 id:120001 of https://codereview.chromium.org/2375343004/ ) Reason for revert: Broke PDFExtensionTest when rolling DEPS in Chromium. Original issue's description: > Assert that only 0-numbered objects are Released() > > This condition holds because numbered objects are brute-force > deleted by the indirect object holder, rather than being > released. > > Be careful about recursive deletion, check before advancing, > since we no longer count on Release() doing this for us. > Fix a few tests where the test was violating ownership rules. > > This should be the last step before completely removing Release() > in favor of direct delete everywhere. > > Committed: https://pdfium.googlesource.com/pdfium/+/aba528a362248a54b27a7e9e046e2b65ab83f624 TBR=tsepez@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2387193003 --- core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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 eb40de7d49..5696fc0c8d 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp @@ -30,7 +30,7 @@ CPDF_Dictionary::~CPDF_Dictionary() { // in case of cyclic references. m_ObjNum = kInvalidObjNum; for (const auto& it : m_Map) { - if (it.second && it.second->GetObjNum() != kInvalidObjNum) + if (it.second) it.second->Release(); } } -- cgit v1.2.3