summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/cpdf_stream.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-10-03 21:28:07 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-03 21:28:07 -0700
commitb73c99335bfbd158ad16dd59c9c52396ffd2b54b (patch)
tree6bdf7a9e4bc85930b8a4112e15b8165e1c52d540 /core/fpdfapi/fpdf_parser/cpdf_stream.cpp
parentad2b20de8ff619f1a8a2f5bda8f5b872a474c8e4 (diff)
downloadpdfium-b73c99335bfbd158ad16dd59c9c52396ffd2b54b.tar.xz
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
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cpdf_stream.cpp')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_stream.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_stream.cpp b/core/fpdfapi/fpdf_parser/cpdf_stream.cpp
index 6a0bf05937..4f6d046397 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_stream.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_stream.cpp
@@ -19,11 +19,7 @@ CPDF_Stream::CPDF_Stream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict)
m_dwSize(size),
m_pDataBuf(pData) {}
-CPDF_Stream::~CPDF_Stream() {
- m_ObjNum = kInvalidObjNum;
- if (m_pDict && m_pDict->GetObjNum() == kInvalidObjNum)
- m_pDict.release(); // lowercase release, release ownership.
-}
+CPDF_Stream::~CPDF_Stream() {}
CPDF_Object::Type CPDF_Stream::GetType() const {
return STREAM;