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

Issue 2509123002: Make CPDF_Object subclass constructors intern strings (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_Object subclass constructors intern strings Make CDPF_Arrays intern the object they create. Allow passing nullptr as a CFX_WeakPtr shortcut as well. Committed: https://pdfium.googlesource.com/pdfium/+/5913a6ca71c85401e3f5317758d44a9fc4a667b2

Patch Set 1 #

Total comments: 3

Patch Set 2 : finish #

Total comments: 6

Patch Set 3 : Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -82 lines) Patch
M core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M core/fpdfapi/font/cpdf_fontencoding.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M core/fpdfapi/page/cpdf_docpagedata.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M core/fpdfapi/page/cpdf_streamcontentparser.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M core/fpdfapi/page/cpdf_streamparser.cpp View 1 1 chunk +3 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cfdf_document.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_array.h View 1 4 chunks +32 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cpdf_array.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M core/fpdfapi/parser/cpdf_dictionary.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_document.cpp View 1 5 chunks +8 lines, -12 lines 0 comments Download
M core/fpdfapi/parser/cpdf_indirect_object_holder.h View 1 2 chunks +12 lines, -4 lines 0 comments Download
M core/fpdfapi/parser/cpdf_name.h View 1 chunk +3 lines, -1 line 0 comments Download
M core/fpdfapi/parser/cpdf_name.cpp View 2 chunks +7 lines, -2 lines 0 comments Download
M core/fpdfapi/parser/cpdf_object.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M core/fpdfapi/parser/cpdf_object_unittest.cpp View 1 3 chunks +8 lines, -7 lines 0 comments Download
M core/fpdfapi/parser/cpdf_string.h View 1 1 chunk +5 lines, -1 line 0 comments Download
M core/fpdfapi/parser/cpdf_string.cpp View 1 2 2 chunks +11 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cpdf_syntax_parser.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M core/fpdfapi/parser/cpdf_syntax_parser.cpp View 1 2 5 chunks +10 lines, -12 lines 0 comments Download
M core/fpdfdoc/cpdf_filespec_unittest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfdoc/cpdf_interform.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M core/fpdfdoc/cpvt_generateap.cpp View 1 2 chunks +2 lines, -3 lines 0 comments Download
M core/fxcrt/cfx_weak_ptr.h View 2 chunks +4 lines, -0 lines 0 comments Download
M fpdfsdk/formfiller/cba_fontmap.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M fpdfsdk/fpdfdoc_unittest.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M fpdfsdk/fpdfeditpage.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M fpdfsdk/fpdfppo.cpp View 1 1 chunk +5 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 23 (15 generated)
Tom Sepez
Dan, for review. This starts to move us away from a bunch of MaybeIntern() calls ...
4 years, 1 month ago (2016-11-16 22:35:47 UTC) #5
Tom Sepez
https://codereview.chromium.org/2509123002/diff/1/core/fpdfapi/parser/cpdf_indirect_object_holder.h File core/fpdfapi/parser/cpdf_indirect_object_holder.h (right): https://codereview.chromium.org/2509123002/diff/1/core/fpdfapi/parser/cpdf_indirect_object_holder.h#newcode47 core/fpdfapi/parser/cpdf_indirect_object_holder.h:47: AddIndirectObject(pdfium::MakeUnique<T>(m_pByteStringPool, args...))); Here, the indirect object holder injects its ...
4 years, 1 month ago (2016-11-16 22:36:36 UTC) #6
Tom Sepez
I think "mostly OOO" is going to have to sign off on this one, as ...
4 years, 1 month ago (2016-11-17 00:39:27 UTC) #11
Lei Zhang
Android bots are red.
4 years, 1 month ago (2016-11-17 00:52:13 UTC) #16
Lei Zhang
lgtm https://codereview.chromium.org/2509123002/diff/20001/core/fpdfapi/parser/cpdf_string.cpp File core/fpdfapi/parser/cpdf_string.cpp (right): https://codereview.chromium.org/2509123002/diff/20001/core/fpdfapi/parser/cpdf_string.cpp#newcode36 core/fpdfapi/parser/cpdf_string.cpp:36: return pRet; Old Android toolchain probably want a ...
4 years, 1 month ago (2016-11-17 01:05:06 UTC) #17
Tom Sepez
https://codereview.chromium.org/2509123002/diff/20001/core/fpdfapi/parser/cpdf_string.cpp File core/fpdfapi/parser/cpdf_string.cpp (right): https://codereview.chromium.org/2509123002/diff/20001/core/fpdfapi/parser/cpdf_string.cpp#newcode36 core/fpdfapi/parser/cpdf_string.cpp:36: return pRet; On 2016/11/17 01:05:06, Lei Zhang (Mostly OOO) ...
4 years, 1 month ago (2016-11-17 01:13:48 UTC) #20
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/2509123002/40001
4 years, 1 month ago (2016-11-17 01:13:50 UTC) #21
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 01:31:22 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://pdfium.googlesource.com/pdfium/+/5913a6ca71c85401e3f5317758d44a9fc4a6...

Powered by Google App Engine
This is Rietveld 408576698