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

Issue 2345063002: Use string pools in some dictionaries (Closed)

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

Description

Use string pools in some dictionaries, names, and strings. BUG=pdfium:597 Committed: https://pdfium.googlesource.com/pdfium/+/698c5716d005860360527e4cfe15b4a185589117

Patch Set 1 #

Patch Set 2 : moar #

Patch Set 3 : Stray file #

Patch Set 4 : more #

Total comments: 2

Patch Set 5 : Document is-a string pool #

Patch Set 6 : Remove default ctor #

Total comments: 14

Patch Set 7 : rebase #

Patch Set 8 : blown-merge #

Patch Set 9 : missing arg #

Patch Set 10 : Document has-a string pool instead of is-a #

Patch Set 11 : comments #

Patch Set 12 : rebase #

Patch Set 13 : windows compilation #

Total comments: 7

Patch Set 14 : rebase #

Patch Set 15 : Address review comments #

Patch Set 16 : sheesh #

Patch Set 17 : rebase #

Patch Set 18 : Address Dan's concern about outliving document #

Total comments: 1

Patch Set 19 : windows compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -185 lines) Patch
M core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -3 lines 0 comments Download
M core/fpdfapi/fpdf_font/cpdf_font.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_font/cpdf_fontencoding.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +5 lines, -5 lines 0 comments Download
M core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -1 line 0 comments Download
M core/fpdfapi/fpdf_page/cpdf_image.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +11 lines, -6 lines 0 comments Download
M core/fpdfapi/fpdf_page/fpdf_page_doc.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M core/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 1 2 3 5 6 7 8 9 4 chunks +7 lines, -5 lines 0 comments Download
M core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +24 lines, -11 lines 0 comments Download
M core/fpdfapi/fpdf_page/pageint.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +9 lines, -7 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cfdf_document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -3 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +11 lines, -6 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 11 chunks +19 lines, -15 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +13 lines, -9 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_stream.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +6 lines, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +20 lines, -12 lines 0 comments Download
M core/fpdfapi/fpdf_parser/include/cfdf_document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +6 lines, -0 lines 0 comments Download
M core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +7 lines, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/include/cpdf_document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +6 lines, -0 lines 0 comments Download
M core/fpdfdoc/cpdf_annotlist.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M core/fpdfdoc/cpdf_filespec.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -2 lines 0 comments Download
M core/fpdfdoc/cpdf_filespec_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -2 lines 0 comments Download
M core/fpdfdoc/cpdf_formfield_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +8 lines, -4 lines 0 comments Download
M core/fpdfdoc/cpdf_interform.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +6 lines, -5 lines 0 comments Download
M core/fpdfdoc/cpvt_generateap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 16 chunks +25 lines, -22 lines 0 comments Download
M core/fpdfdoc/include/cpdf_annot.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M core/fpdfdoc/include/cpdf_filespec.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -1 line 0 comments Download
M core/fxge/dib/fx_dib_engine_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/include/cfx_renderdevice.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -10 lines 0 comments Download
M fpdfsdk/cpdfsdk_baannot.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +12 lines, -14 lines 0 comments Download
M fpdfsdk/cpdfsdk_widget.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -5 lines 0 comments Download
M fpdfsdk/formfiller/cba_fontmap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -4 lines 0 comments Download
M fpdfsdk/fpdf_flatten.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +11 lines, -10 lines 0 comments Download
M fpdfsdk/fpdf_transformpage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -7 lines 0 comments Download
M fpdfsdk/fpdfdoc_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +5 lines, -3 lines 0 comments Download
M fpdfsdk/fpdfeditpage.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/fpdfppo.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/fpdfsave.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 71 (52 generated)
Tom Sepez
Dan, for review.
4 years, 3 months ago (2016-09-15 22:11:52 UTC) #4
Tom Sepez
4 years, 3 months ago (2016-09-16 16:10:05 UTC) #10
Tom Sepez
https://codereview.chromium.org/2345063002/diff/60001/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h File core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h (right): https://codereview.chromium.org/2345063002/diff/60001/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h#newcode26 core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h:26: CPDF_Dictionary(CFX_ByteStringPool* pPool); note: The question is whether it is ...
4 years, 3 months ago (2016-09-16 19:58:39 UTC) #11
dsinclair
https://codereview.chromium.org/2345063002/diff/60001/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h File core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h (right): https://codereview.chromium.org/2345063002/diff/60001/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h#newcode26 core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h:26: CPDF_Dictionary(CFX_ByteStringPool* pPool); On 2016/09/16 19:58:39, Tom Sepez wrote: > ...
4 years, 3 months ago (2016-09-19 13:24:34 UTC) #20
Tom Sepez
On 2016/09/19 13:24:34, dsinclair wrote: > https://codereview.chromium.org/2345063002/diff/60001/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h > File core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h (right): > > https://codereview.chromium.org/2345063002/diff/60001/core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h#newcode26 > ...
4 years, 3 months ago (2016-09-19 17:05:06 UTC) #21
dsinclair
On 2016/09/19 17:05:06, Tom Sepez wrote: > On 2016/09/19 13:24:34, dsinclair wrote: > > > ...
4 years, 3 months ago (2016-09-19 17:21:33 UTC) #23
Tom Sepez
> That is a potential issue. With the string pool, what happens if I get ...
4 years, 3 months ago (2016-09-19 17:35:03 UTC) #29
dsinclair
On 2016/09/19 17:35:03, Tom Sepez wrote: > > That is a potential issue. With the ...
4 years, 3 months ago (2016-09-19 17:41:40 UTC) #30
Tom Sepez
What remains is to prove/disprove the lifespan assumption. https://codereview.chromium.org/2345063002/diff/100001/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h File core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h (right): https://codereview.chromium.org/2345063002/diff/100001/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h#newcode97 core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h:97: CFX_ByteStringPool* ...
4 years, 3 months ago (2016-09-19 18:25:00 UTC) #33
dsinclair
This looks a lot clearer with the passing of the explicit pool.
4 years, 3 months ago (2016-09-19 18:31:22 UTC) #36
Tom Sepez
Lei, (non-ooo version), any thoughts?
4 years, 3 months ago (2016-09-19 19:54:52 UTC) #47
Lei Zhang
https://codereview.chromium.org/2345063002/diff/240001/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp File core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp (right): https://codereview.chromium.org/2345063002/diff/240001/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp#newcode40 core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp:40: : m_MetadataObjnum(0), Use a delegate ctor? : CPDF_SyntaxParser(nullptr) {} ...
4 years, 3 months ago (2016-09-20 23:48:24 UTC) #48
Tom Sepez
https://codereview.chromium.org/2345063002/diff/240001/core/fpdfapi/fpdf_parser/include/cpdf_document.h File core/fpdfapi/fpdf_parser/include/cpdf_document.h (right): https://codereview.chromium.org/2345063002/diff/240001/core/fpdfapi/fpdf_parser/include/cpdf_document.h#newcode129 core/fpdfapi/fpdf_parser/include/cpdf_document.h:129: CFX_ByteStringPool m_ByteStringPool; On 2016/09/20 23:48:23, Lei Zhang wrote: > ...
4 years, 2 months ago (2016-09-27 20:42:57 UTC) #49
Tom Sepez
https://codereview.chromium.org/2345063002/diff/240001/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp File core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp (right): https://codereview.chromium.org/2345063002/diff/240001/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp#newcode40 core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp:40: : m_MetadataObjnum(0), On 2016/09/20 23:48:23, Lei Zhang wrote: > ...
4 years, 2 months ago (2016-09-27 22:36:59 UTC) #52
Tom Sepez
Lei, PS#18. Strings themselves are refcounted and live only as long as needed independent of ...
4 years, 2 months ago (2016-09-28 22:30:03 UTC) #61
Lei Zhang
lgtm https://codereview.chromium.org/2345063002/diff/340001/core/fpdfapi/fpdf_parser/include/cpdf_document.h File core/fpdfapi/fpdf_parser/include/cpdf_document.h (right): https://codereview.chromium.org/2345063002/diff/340001/core/fpdfapi/fpdf_parser/include/cpdf_document.h#newcode142 core/fpdfapi/fpdf_parser/include/cpdf_document.h:142: CFX_WeakPtr<CFX_ByteStringPool> m_pByteStringPool; Does this have to be last? ...
4 years, 2 months ago (2016-09-28 23:26:35 UTC) #66
Tom Sepez
On 2016/09/28 23:26:35, Lei Zhang wrote: > lgtm > > https://codereview.chromium.org/2345063002/diff/340001/core/fpdfapi/fpdf_parser/include/cpdf_document.h > File core/fpdfapi/fpdf_parser/include/cpdf_document.h (right): ...
4 years, 2 months ago (2016-09-28 23:46:35 UTC) #67
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/2345063002/360001
4 years, 2 months ago (2016-09-28 23:46:48 UTC) #69
commit-bot: I haz the power
4 years, 2 months ago (2016-09-28 23:47:14 UTC) #71
Message was sent while issue was closed.
Committed patchset #19 (id:360001) as
https://pdfium.googlesource.com/pdfium/+/698c5716d005860360527e4cfe15b4a18558...

Powered by Google App Engine
This is Rietveld 408576698