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

Issue 2466023002: Unify some code (Closed)

Created:
4 years, 1 month ago by snake
Modified:
4 years, 1 month ago
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Unify some code Move parsing of linearized header into separate CPDF_Linearized class. Committed: https://pdfium.googlesource.com/pdfium/+/71333dc57ac7e4cf7963c83333730b3882ab371f

Patch Set 1 #

Patch Set 2 : Add missing changes #

Total comments: 9

Patch Set 3 : Fix review issues #

Total comments: 2

Patch Set 4 : Fix review issues. #

Total comments: 13

Patch Set 5 : Fix review issues. #

Patch Set 6 : Fix compilation #

Total comments: 10

Patch Set 7 : Fix review issues. #

Patch Set 8 : Fix review issues. #

Total comments: 7

Patch Set 9 : Fix review issues. #

Total comments: 10

Patch Set 10 : Fix review issues. #

Patch Set 11 : Fix review issues. #

Total comments: 14

Patch Set 12 : Fix review issues. #

Total comments: 5

Patch Set 13 : Fix review issues. #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -202 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M core/fpdfapi/parser/cpdf_data_avail.h View 1 2 3 4 5 6 3 chunks +2 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cpdf_data_avail.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 13 chunks +33 lines, -114 lines 0 comments Download
M core/fpdfapi/parser/cpdf_document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M core/fpdfapi/parser/cpdf_document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -15 lines 0 comments Download
M core/fpdfapi/parser/cpdf_document_unittest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -5 lines 0 comments Download
M core/fpdfapi/parser/cpdf_hint_tables.h View 3 chunks +3 lines, -6 lines 0 comments Download
M core/fpdfapi/parser/cpdf_hint_tables.cpp View 3 chunks +10 lines, -22 lines 0 comments Download
A core/fpdfapi/parser/cpdf_linearized.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +55 lines, -0 lines 0 comments Download
A core/fpdfapi/parser/cpdf_linearized.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +69 lines, -0 lines 0 comments Download
M core/fpdfapi/parser/cpdf_parser.h View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M core/fpdfapi/parser/cpdf_parser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +13 lines, -33 lines 0 comments Download

Messages

Total messages: 53 (20 generated)
snake
4 years, 1 month ago (2016-10-31 20:06:04 UTC) #3
Lei Zhang
Need to fix the build... https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode9 core/fpdfapi/parser/cpdf_linearized.cpp:9: #include "core/fpdfapi/parser/cpdf_dictionary.h" nit: alphabetical ...
4 years, 1 month ago (2016-11-01 00:29:53 UTC) #8
snake
https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode9 core/fpdfapi/parser/cpdf_linearized.cpp:9: #include "core/fpdfapi/parser/cpdf_dictionary.h" On 2016/11/01 00:29:53, Lei Zhang wrote: > ...
4 years, 1 month ago (2016-11-01 14:39:24 UTC) #9
Lei Zhang
https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode20 core/fpdfapi/parser/cpdf_linearized.cpp:20: return std::unique_ptr<CPDF_Linearized>(new CPDF_Linearized(pDict)); On 2016/11/01 14:39:24, snake wrote: > ...
4 years, 1 month ago (2016-11-01 22:51:29 UTC) #14
snake
https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.h File core/fpdfapi/parser/cpdf_linearized.h (right): https://codereview.chromium.org/2466023002/diff/20001/core/fpdfapi/parser/cpdf_linearized.h#newcode38 core/fpdfapi/parser/cpdf_linearized.h:38: FX_FILESIZE m_szFileSize = 0; On 2016/11/01 22:51:29, Lei Zhang ...
4 years, 1 month ago (2016-11-02 12:11:17 UTC) #15
snake
Lei Zhang, Can you send email to committers@chromium.org for nominating me for try job access. ...
4 years, 1 month ago (2016-11-02 19:21:51 UTC) #16
Lei Zhang
https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_data_avail.cpp File core/fpdfapi/parser/cpdf_data_avail.cpp (left): https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_data_avail.cpp#oldcode871 core/fpdfapi/parser/cpdf_data_avail.cpp:871: m_bLinearized = TRUE; Is this variable still needed at ...
4 years, 1 month ago (2016-11-02 21:34:22 UTC) #21
snake
https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_data_avail.cpp File core/fpdfapi/parser/cpdf_data_avail.cpp (left): https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_data_avail.cpp#oldcode871 core/fpdfapi/parser/cpdf_data_avail.cpp:871: m_bLinearized = TRUE; On 2016/11/02 21:34:22, Lei Zhang wrote: ...
4 years, 1 month ago (2016-11-02 22:04:29 UTC) #22
snake
https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode15 core/fpdfapi/parser/cpdf_linearized.cpp:15: if (!pObj) On 2016/11/02 21:34:22, Lei Zhang wrote: > ...
4 years, 1 month ago (2016-11-02 22:35:16 UTC) #23
Lei Zhang
Oh, conflicting CLs landed that replaced FX_BOOL, TRUE and FALSE with bool, true and false, ...
4 years, 1 month ago (2016-11-03 00:46:26 UTC) #24
snake
https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/60001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode15 core/fpdfapi/parser/cpdf_linearized.cpp:15: if (!pObj) On 2016/11/03 00:46:26, Lei Zhang wrote: > ...
4 years, 1 month ago (2016-11-03 01:39:27 UTC) #25
Lei Zhang
https://codereview.chromium.org/2466023002/diff/100001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/100001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode24 core/fpdfapi/parser/cpdf_linearized.cpp:24: m_dwFirstPageNo = pDict->GetIntegerFor("P"); On 2016/11/03 01:39:27, snake wrote: > ...
4 years, 1 month ago (2016-11-03 01:59:31 UTC) #26
snake
https://codereview.chromium.org/2466023002/diff/100001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/100001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode24 core/fpdfapi/parser/cpdf_linearized.cpp:24: m_dwFirstPageNo = pDict->GetIntegerFor("P"); On 2016/11/03 01:59:31, Lei Zhang wrote: ...
4 years, 1 month ago (2016-11-03 02:36:52 UTC) #27
Lei Zhang
I need to look at the callers some more. It is not your fault of ...
4 years, 1 month ago (2016-11-03 15:38:41 UTC) #28
snake
> I need to look at the callers some more. It is not your > ...
4 years, 1 month ago (2016-11-03 16:03:42 UTC) #29
Lei Zhang
https://codereview.chromium.org/2466023002/diff/140001/core/fpdfapi/parser/cpdf_hint_tables.cpp File core/fpdfapi/parser/cpdf_hint_tables.cpp (right): https://codereview.chromium.org/2466023002/diff/140001/core/fpdfapi/parser/cpdf_hint_tables.cpp#newcode499 core/fpdfapi/parser/cpdf_hint_tables.cpp:499: return static_cast<int>(m_pLinearized->GetFirstPageObjNum()); There's a subtle difference here: all the ...
4 years, 1 month ago (2016-11-03 17:18:00 UTC) #30
snake
https://codereview.chromium.org/2466023002/diff/140001/core/fpdfapi/parser/cpdf_hint_tables.cpp File core/fpdfapi/parser/cpdf_hint_tables.cpp (right): https://codereview.chromium.org/2466023002/diff/140001/core/fpdfapi/parser/cpdf_hint_tables.cpp#newcode499 core/fpdfapi/parser/cpdf_hint_tables.cpp:499: return static_cast<int>(m_pLinearized->GetFirstPageObjNum()); On 2016/11/03 17:18:00, Lei Zhang wrote: > ...
4 years, 1 month ago (2016-11-03 17:50:34 UTC) #31
snake
What should i do, to commit this CL? May be i will remove the IsValid ...
4 years, 1 month ago (2016-11-03 22:29:26 UTC) #32
Lei Zhang
I think we can make a bit more progress on this CL and land it ...
4 years, 1 month ago (2016-11-04 01:10:15 UTC) #33
snake
https://codereview.chromium.org/2466023002/diff/160001/core/fpdfapi/parser/cpdf_data_avail.cpp File core/fpdfapi/parser/cpdf_data_avail.cpp (right): https://codereview.chromium.org/2466023002/diff/160001/core/fpdfapi/parser/cpdf_data_avail.cpp#newcode619 core/fpdfapi/parser/cpdf_data_avail.cpp:619: if (!m_pLinearized->GetFirstPageEndOffset() || On 2016/11/04 01:10:15, Lei Zhang wrote: ...
4 years, 1 month ago (2016-11-04 22:39:14 UTC) #34
Lei Zhang
https://codereview.chromium.org/2466023002/diff/160001/core/fpdfapi/parser/cpdf_parser.cpp File core/fpdfapi/parser/cpdf_parser.cpp (right): https://codereview.chromium.org/2466023002/diff/160001/core/fpdfapi/parser/cpdf_parser.cpp#newcode1491 core/fpdfapi/parser/cpdf_parser.cpp:1491: m_pSyntax->GetNextWord(nullptr); On 2016/11/04 22:39:14, snake wrote: > On 2016/11/04 ...
4 years, 1 month ago (2016-11-04 23:02:15 UTC) #35
snake
https://codereview.chromium.org/2466023002/diff/200001/core/fpdfapi/parser/cpdf_document_unittest.cpp File core/fpdfapi/parser/cpdf_document_unittest.cpp (right): https://codereview.chromium.org/2466023002/diff/200001/core/fpdfapi/parser/cpdf_document_unittest.cpp#newcode86 core/fpdfapi/parser/cpdf_document_unittest.cpp:86: TestLinearized(CPDF_Dictionary* dict) : CPDF_Linearized(dict) {} On 2016/11/04 23:02:15, Lei ...
4 years, 1 month ago (2016-11-04 23:27:36 UTC) #36
Lei Zhang
lgtm https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode20 core/fpdfapi/parser/cpdf_linearized.cpp:20: bool must_exists = true) { I was thinking ...
4 years, 1 month ago (2016-11-04 23:38:18 UTC) #37
snake
https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode20 core/fpdfapi/parser/cpdf_linearized.cpp:20: bool must_exists = true) { On 2016/11/04 23:38:18, Lei ...
4 years, 1 month ago (2016-11-04 23:46:50 UTC) #38
Lei Zhang
https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode20 core/fpdfapi/parser/cpdf_linearized.cpp:20: bool must_exists = true) { On 2016/11/04 23:46:49, snake ...
4 years, 1 month ago (2016-11-05 00:00:52 UTC) #39
snake
https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode20 core/fpdfapi/parser/cpdf_linearized.cpp:20: bool must_exists = true) { On 2016/11/05 00:00:52, Lei ...
4 years, 1 month ago (2016-11-05 00:15:57 UTC) #40
Lei Zhang
Thanks for addressing all of my concerns. https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp File core/fpdfapi/parser/cpdf_linearized.cpp (right): https://codereview.chromium.org/2466023002/diff/220001/core/fpdfapi/parser/cpdf_linearized.cpp#newcode20 core/fpdfapi/parser/cpdf_linearized.cpp:20: bool must_exists ...
4 years, 1 month ago (2016-11-05 00:32:28 UTC) #41
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/2466023002/240001
4 years, 1 month ago (2016-11-05 00:41:00 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: linux_no_v8 on master.tryserver.client.pdfium (JOB_FAILED, https://build.chromium.org/p/tryserver.client.pdfium/builders/linux_no_v8/builds/2691) mac on master.tryserver.client.pdfium (JOB_FAILED, ...
4 years, 1 month ago (2016-11-05 00:42:10 UTC) #46
Lei Zhang
Patch failed to apply probably because CPDF_Object and sub-classes now no longer need the ReleaseDeleter.
4 years, 1 month ago (2016-11-05 00:43:41 UTC) #47
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/2466023002/260001
4 years, 1 month ago (2016-11-05 01:03:11 UTC) #50
commit-bot: I haz the power
Committed patchset #14 (id:260001) as https://pdfium.googlesource.com/pdfium/+/71333dc57ac7e4cf7963c83333730b3882ab371f
4 years, 1 month ago (2016-11-05 01:17:31 UTC) #52
dsinclair
4 years, 1 month ago (2016-11-05 04:05:51 UTC) #53
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:260001) has been created in
https://codereview.chromium.org/2474283005/ by dsinclair@chromium.org.

The reason for reverting is: Breaking the chrome roll. See
https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium....

Powered by Google App Engine
This is Rietveld 408576698