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

Issue 513063003: No need to release resources in destructor of CPDF_ShadingObject (Closed)

Created:
6 years, 3 months ago by Bo Xu
Modified:
5 years, 9 months ago
Reviewers:
Tom Sepez, jun_fang
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Visibility:
Public.

Description

No need to release resources in destructor of CPDF_ShadingObject CPDF_DocPageData::~CPDF_DocPageData() will force to release all resources, so no need to do it here, which can result in heap-use-after-free trouble. BUG=408164 R=jun_fang@foxitsoftware.com, tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/f105b19

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -4 lines) Patch
M core/src/fpdfapi/fpdf_page/fpdf_page.cpp View 1 chunk +0 lines, -4 lines 2 comments Download

Messages

Total messages: 9 (0 generated)
Bo Xu
bo_xu@foxitsoftware.com changed reviewers: + jun_fang@foxitsoftware.com, tsepez@chromium.org
6 years, 3 months ago (2014-08-28 06:44:36 UTC) #1
Bo Xu
On 2014/08/28 06:44:36, Bo Xu wrote: > mailto:bo_xu@foxitsoftware.com changed reviewers: > + mailto:jun_fang@foxitsoftware.com, mailto:tsepez@chromium.org Tom, ...
6 years, 3 months ago (2014-08-28 06:44:52 UTC) #2
jun_fang
On 2014/08/28 06:44:52, Bo Xu wrote: > On 2014/08/28 06:44:36, Bo Xu wrote: > > ...
6 years, 3 months ago (2014-08-28 16:29:55 UTC) #3
Tom Sepez
lgtm
6 years, 3 months ago (2014-08-28 16:32:41 UTC) #4
jun_fang
https://codereview.chromium.org/513063003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp File core/src/fpdfapi/fpdf_page/fpdf_page.cpp (left): https://codereview.chromium.org/513063003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp#oldcode611 core/src/fpdfapi/fpdf_page/fpdf_page.cpp:611: pShading->m_pDocument->GetPageData()->ReleasePattern(pShading->m_pShadingObj); Maybe you can save a reference to document ...
6 years, 3 months ago (2014-08-28 16:38:14 UTC) #5
Bo Xu
On 2014/08/28 16:29:55, jun_fang wrote: > On 2014/08/28 06:44:52, Bo Xu wrote: > > On ...
6 years, 3 months ago (2014-08-28 17:02:16 UTC) #6
jun_fang
On 2014/08/28 17:02:16, Bo Xu wrote: > On 2014/08/28 16:29:55, jun_fang wrote: > > On ...
6 years, 3 months ago (2014-08-28 17:03:08 UTC) #7
Bo Xu
https://codereview.chromium.org/513063003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp File core/src/fpdfapi/fpdf_page/fpdf_page.cpp (left): https://codereview.chromium.org/513063003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp#oldcode611 core/src/fpdfapi/fpdf_page/fpdf_page.cpp:611: pShading->m_pDocument->GetPageData()->ReleasePattern(pShading->m_pShadingObj); On 2014/08/28 16:38:14, jun_fang wrote: > Maybe you ...
6 years, 3 months ago (2014-08-28 17:07:24 UTC) #8
Bo Xu
6 years, 3 months ago (2014-08-28 18:49:20 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as f105b19 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698