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

Issue 2419173002: Update CPDF_IndirectObjectHolder APIs for unique objects (Closed)

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

Description

Update CPDF_IndirectObjectHolder APIs for unique objects. Doing so highlights a few places where ownership is dubious. Add convenience functions to return an unowned reference to a newly-created indirect object. Committed: https://pdfium.googlesource.com/pdfium/+/3ba098595ae56b64eacc0c25ab76b89a4d78d920

Patch Set 1 #

Patch Set 2 : Redundant GetObjNum() calls #

Patch Set 3 : Owner #

Patch Set 4 : windows #

Total comments: 10

Patch Set 5 : Fix issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -181 lines) Patch
M core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp View 1 2 3 4 4 chunks +10 lines, -12 lines 0 comments Download
M core/fpdfapi/edit/fpdf_edit_create.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M core/fpdfapi/page/cpdf_docpagedata.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/fpdfapi/page/cpdf_image.cpp View 1 3 chunks +7 lines, -7 lines 0 comments Download
M core/fpdfapi/parser/cfdf_document.cpp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cpdf_array.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M core/fpdfapi/parser/cpdf_array.cpp View 2 chunks +8 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_array_unittest.cpp View 1 chunk +4 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cpdf_data_avail.cpp View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_dictionary.h View 1 chunk +3 lines, -0 lines 0 comments Download
M core/fpdfapi/parser/cpdf_dictionary.cpp View 2 chunks +8 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_document.cpp View 1 2 3 4 13 chunks +27 lines, -23 lines 0 comments Download
M core/fpdfapi/parser/cpdf_indirect_object_holder.h View 3 chunks +23 lines, -5 lines 0 comments Download
M core/fpdfapi/parser/cpdf_indirect_object_holder.cpp View 1 2 3 4 2 chunks +39 lines, -12 lines 0 comments Download
M core/fpdfapi/parser/cpdf_object_unittest.cpp View 3 chunks +4 lines, -5 lines 0 comments Download
M core/fpdfapi/parser/cpdf_parser.cpp View 1 chunk +2 lines, -5 lines 0 comments Download
M core/fpdfdoc/cpdf_formfield_unittest.cpp View 2 chunks +5 lines, -8 lines 0 comments Download
M core/fpdfdoc/cpdf_interform.cpp View 1 2 2 chunks +4 lines, -5 lines 0 comments Download
M core/fpdfdoc/cpvt_fontmap.cpp View 1 1 chunk +3 lines, -4 lines 0 comments Download
M core/fpdfdoc/cpvt_generateap.cpp View 1 7 chunks +11 lines, -14 lines 0 comments Download
M fpdfsdk/cpdfsdk_baannot.cpp View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M fpdfsdk/cpdfsdk_widget.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/formfiller/cba_fontmap.cpp View 1 2 chunks +5 lines, -8 lines 0 comments Download
M fpdfsdk/fpdf_flatten.cpp View 1 2 3 4 4 chunks +10 lines, -10 lines 0 comments Download
M fpdfsdk/fpdf_transformpage.cpp View 4 chunks +12 lines, -17 lines 0 comments Download
M fpdfsdk/fpdfdoc_unittest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/fpdfppo.cpp View 4 chunks +9 lines, -8 lines 0 comments Download
M fpdfsdk/fpdfsave.cpp View 2 chunks +7 lines, -11 lines 0 comments Download

Messages

Total messages: 23 (16 generated)
Tom Sepez
Lei, for review.
4 years, 2 months ago (2016-10-14 21:56:20 UTC) #7
Lei Zhang
Still reading. https://codereview.chromium.org/2419173002/diff/60001/core/fpdfapi/parser/cfdf_document.cpp File core/fpdfapi/parser/cfdf_document.cpp (right): https://codereview.chromium.org/2419173002/diff/60001/core/fpdfapi/parser/cfdf_document.cpp#newcode72 core/fpdfapi/parser/cfdf_document.cpp:72: UniqueObject(pObj)); // Owner? There's a few of ...
4 years, 2 months ago (2016-10-14 23:18:05 UTC) #13
Lei Zhang
https://codereview.chromium.org/2419173002/diff/60001/core/fpdfapi/parser/cpdf_document.cpp File core/fpdfapi/parser/cpdf_document.cpp (right): https://codereview.chromium.org/2419173002/diff/60001/core/fpdfapi/parser/cpdf_document.cpp#newcode832 core/fpdfapi/parser/cpdf_document.cpp:832: CPDF_Object* pUnowned = AddIndirectObject(std::move(pFontDict)); Can we do CPDF_Dictionary* pFontDict ...
4 years, 2 months ago (2016-10-14 23:24:39 UTC) #14
Tom Sepez
https://codereview.chromium.org/2419173002/diff/60001/core/fpdfapi/parser/cfdf_document.cpp File core/fpdfapi/parser/cfdf_document.cpp (right): https://codereview.chromium.org/2419173002/diff/60001/core/fpdfapi/parser/cfdf_document.cpp#newcode72 core/fpdfapi/parser/cfdf_document.cpp:72: UniqueObject(pObj)); // Owner? On 2016/10/14 23:18:04, Lei Zhang wrote: ...
4 years, 2 months ago (2016-10-14 23:42:29 UTC) #17
Lei Zhang
lgtm
4 years, 2 months ago (2016-10-14 23:45:25 UTC) #18
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/2419173002/80001
4 years, 2 months ago (2016-10-14 23:50:10 UTC) #21
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 23:59:14 UTC) #23
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://pdfium.googlesource.com/pdfium/+/3ba098595ae56b64eacc0c25ab76b89a4d78...

Powered by Google App Engine
This is Rietveld 408576698