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

Issue 2489423002: Make CPDF_PageContentGenerator methods take object numbers (Closed)

Created:
4 years, 1 month ago by Tom Sepez
Modified:
4 years, 1 month ago
Reviewers:
Lei Zhang, dsinclair
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Make CPDF_PageContentGenerator methods take object numbers This patch fixes a possibility that an owned CPDF_Stream is handed to the indirect object holder inside RealizeResource(). Its arguments are changed to take an object number, as is done elsewhere in the code, to suggest that only indirect objects are acceptable. BUG=660756 Committed: https://pdfium.googlesource.com/pdfium/+/137a344ad02056107e2e01d5d55f5e97d21fa74b

Patch Set 1 #

Total comments: 1

Patch Set 2 : Call the plumber #

Total comments: 2

Patch Set 3 : Add ConvertToIndirectObject #

Patch Set 4 : Pass more arguments as object numbers #

Patch Set 5 : Rebase past fix in separate CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -56 lines) Patch
M core/fpdfapi/edit/cpdf_pagecontentgenerator.h View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp View 1 2 3 4 4 chunks +16 lines, -10 lines 0 comments Download
M core/fpdfapi/page/cpdf_docpagedata.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M core/fpdfapi/page/cpdf_docpagedata.cpp View 1 2 3 1 chunk +8 lines, -18 lines 0 comments Download
M core/fpdfapi/page/cpdf_image.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M core/fpdfapi/page/cpdf_image.cpp View 1 2 3 4 5 chunks +16 lines, -11 lines 0 comments Download
M core/fpdfapi/page/cpdf_imageobject.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/page/cpdf_streamcontentparser.cpp View 1 2 3 2 chunks +2 lines, -6 lines 0 comments Download
M core/fpdfapi/parser/cpdf_document.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/parser/cpdf_document.cpp View 1 2 3 1 chunk +3 lines, -6 lines 0 comments Download

Messages

Total messages: 31 (18 generated)
Tom Sepez
Lei, ready for review. https://codereview.chromium.org/2489423002/diff/1/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp File core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp (right): https://codereview.chromium.org/2489423002/diff/1/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp#newcode105 core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp:105: pStream = ToStream(pStream->Clone().release()); Note: this ...
4 years, 1 month ago (2016-11-10 21:15:26 UTC) #5
Lei Zhang
I can try to repro on Windows later today. The ASAN bot is red, BTW.
4 years, 1 month ago (2016-11-10 21:37:44 UTC) #6
Lei Zhang
On 2016/11/10 21:37:44, Lei Zhang (slow) wrote: > I can try to repro on Windows ...
4 years, 1 month ago (2016-11-10 22:25:20 UTC) #9
Tom Sepez
On 2016/11/10 22:25:20, Lei Zhang (slow) wrote: > On 2016/11/10 21:37:44, Lei Zhang (slow) wrote: ...
4 years, 1 month ago (2016-11-10 23:00:30 UTC) #14
Lei Zhang
https://codereview.chromium.org/2489423002/diff/20001/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp File core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp (right): https://codereview.chromium.org/2489423002/diff/20001/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp#newcode98 core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp:98: CPDF_Image* pImage = pImageObj->GetImage(); I tried patch set 2 ...
4 years, 1 month ago (2016-11-10 23:09:57 UTC) #15
Lei Zhang
On 2016/11/10 23:09:57, Lei Zhang (slow) wrote: > https://codereview.chromium.org/2489423002/diff/20001/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp > File core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp (right): > > ...
4 years, 1 month ago (2016-11-10 23:18:13 UTC) #16
Lei Zhang
https://codereview.chromium.org/2489423002/diff/20001/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp File core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp (right): https://codereview.chromium.org/2489423002/diff/20001/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp#newcode102 core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp:102: CPDF_Stream* pStream = pImage->GetStream(); Err, it's a NULL |pStream|.
4 years, 1 month ago (2016-11-10 23:20:31 UTC) #17
Tom Sepez
+Dan who is not "not reviewing code".
4 years, 1 month ago (2016-11-14 22:16:26 UTC) #21
dsinclair
lgtm
4 years, 1 month ago (2016-11-14 22:23:42 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2489423002/80001
4 years, 1 month ago (2016-11-14 22:59:00 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://pdfium.googlesource.com/pdfium/+/137a344ad02056107e2e01d5d55f5e97d21fa74b
4 years, 1 month ago (2016-11-14 23:03:59 UTC) #29
Tom Sepez
LGTM, thanks.
4 years, 1 month ago (2016-11-21 18:00:14 UTC) #30
Tom Sepez
4 years, 1 month ago (2016-11-21 18:03:56 UTC) #31
Message was sent while issue was closed.
Ooops, wrong CL for last message, meant to say, see also
https://codereview.chromium.org/2513273003/ for why inline
isn't the same as owning stream.

Powered by Google App Engine
This is Rietveld 408576698