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

Issue 2149903002: Use smart pointers for various Jbig2 decoding contexts (Closed)

Created:
4 years, 5 months ago by Wei Li
Modified:
4 years, 5 months ago
Reviewers:
Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Use smart pointers for various Jbig2 decoding contexts Use unique_ptr for class owned member variables, and remove unnecessary or unused functions and member variable. BUG=pdfium:518 Committed: https://pdfium.googlesource.com/pdfium/+/8ca60b2cda3efc112c987c1d57d1eb8568667da9

Patch Set 1 #

Patch Set 2 : style #

Total comments: 4

Patch Set 3 : rebase #

Patch Set 4 : address comments #

Total comments: 10

Patch Set 5 : address more comments #

Total comments: 2

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -319 lines) Patch
M core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp View 11 chunks +18 lines, -25 lines 0 comments Download
M core/fpdfapi/fpdf_render/render_int.h View 1 1 chunk +1 line, -1 line 0 comments Download
M core/fxcodec/codec/ccodec_jbig2module.h View 4 chunks +2 lines, -5 lines 0 comments Download
M core/fxcodec/codec/fx_codec_jbig.cpp View 4 chunks +14 lines, -22 lines 0 comments Download
M core/fxcodec/jbig2/JBig2_Context.h View 1 2 3 4 chunks +10 lines, -33 lines 0 comments Download
M core/fxcodec/jbig2/JBig2_Context.cpp View 1 2 3 4 11 chunks +17 lines, -32 lines 0 comments Download
M core/fxge/dib/fx_dib_composite.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/dib/fx_dib_convert.cpp View 1 2 3 4 10 chunks +25 lines, -23 lines 0 comments Download
M core/fxge/dib/fx_dib_main.cpp View 1 2 3 4 34 chunks +101 lines, -73 lines 0 comments Download
M core/fxge/dib/fx_dib_transform.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/include/fx_dib.h View 1 2 3 4 chunks +17 lines, -17 lines 0 comments Download
M core/fxge/include/fx_ge_win32.h View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M core/fxge/win32/fx_win32_dib.cpp View 1 chunk +0 lines, -82 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
Wei Li
pls review, thanks
4 years, 5 months ago (2016-07-15 17:38:27 UTC) #4
Lei Zhang
https://codereview.chromium.org/2149903002/diff/60001/core/fxcodec/jbig2/JBig2_Context.h File core/fxcodec/jbig2/JBig2_Context.h (right): https://codereview.chromium.org/2149903002/diff/60001/core/fxcodec/jbig2/JBig2_Context.h#newcode100 core/fxcodec/jbig2/JBig2_Context.h:100: std::unique_ptr<JBig2ArithCtx, FxFreeDeleter> m_gbContext; vector? https://codereview.chromium.org/2149903002/diff/60001/core/fxge/include/fx_dib.h File core/fxge/include/fx_dib.h (right): https://codereview.chromium.org/2149903002/diff/60001/core/fxge/include/fx_dib.h#newcode268 ...
4 years, 5 months ago (2016-07-16 01:30:38 UTC) #5
Wei Li
ptal, thanks
4 years, 5 months ago (2016-07-18 21:08:42 UTC) #6
Wei Li
forgot to reply https://codereview.chromium.org/2149903002/diff/60001/core/fxcodec/jbig2/JBig2_Context.h File core/fxcodec/jbig2/JBig2_Context.h (right): https://codereview.chromium.org/2149903002/diff/60001/core/fxcodec/jbig2/JBig2_Context.h#newcode100 core/fxcodec/jbig2/JBig2_Context.h:100: std::unique_ptr<JBig2ArithCtx, FxFreeDeleter> m_gbContext; On 2016/07/16 01:30:38, ...
4 years, 5 months ago (2016-07-18 21:29:35 UTC) #7
Lei Zhang
lgtm https://codereview.chromium.org/2149903002/diff/100001/core/fxcodec/jbig2/JBig2_Context.cpp File core/fxcodec/jbig2/JBig2_Context.cpp (right): https://codereview.chromium.org/2149903002/diff/100001/core/fxcodec/jbig2/JBig2_Context.cpp#newcode1087 core/fxcodec/jbig2/JBig2_Context.cpp:1087: if (!m_gbContext.size()) { if (m_gbContext.empty()) https://codereview.chromium.org/2149903002/diff/100001/core/fxge/dib/fx_dib_convert.cpp File core/fxge/dib/fx_dib_convert.cpp ...
4 years, 5 months ago (2016-07-18 23:55:10 UTC) #8
Wei Li
thanks https://codereview.chromium.org/2149903002/diff/100001/core/fxcodec/jbig2/JBig2_Context.cpp File core/fxcodec/jbig2/JBig2_Context.cpp (right): https://codereview.chromium.org/2149903002/diff/100001/core/fxcodec/jbig2/JBig2_Context.cpp#newcode1087 core/fxcodec/jbig2/JBig2_Context.cpp:1087: if (!m_gbContext.size()) { On 2016/07/18 23:55:10, Lei Zhang ...
4 years, 5 months ago (2016-07-19 21:21:29 UTC) #9
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/2149903002/140001
4 years, 5 months ago (2016-07-19 22:52:39 UTC) #12
Lei Zhang
https://codereview.chromium.org/2149903002/diff/120001/core/fxge/dib/fx_dib_main.cpp File core/fxge/dib/fx_dib_main.cpp (right): https://codereview.chromium.org/2149903002/diff/120001/core/fxge/dib/fx_dib_main.cpp#newcode9 core/fxge/dib/fx_dib_main.cpp:9: #include <algorithm> C++ headers after C headers.
4 years, 5 months ago (2016-07-19 22:57:26 UTC) #13
commit-bot: I haz the power
Committed patchset #6 (id:140001) as https://pdfium.googlesource.com/pdfium/+/8ca60b2cda3efc112c987c1d57d1eb8568667da9
4 years, 5 months ago (2016-07-19 23:06:27 UTC) #15
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 23:06:29 UTC) #16
Wei Li
https://codereview.chromium.org/2149903002/diff/120001/core/fxge/dib/fx_dib_main.cpp File core/fxge/dib/fx_dib_main.cpp (right): https://codereview.chromium.org/2149903002/diff/120001/core/fxge/dib/fx_dib_main.cpp#newcode9 core/fxge/dib/fx_dib_main.cpp:9: #include <algorithm> On 2016/07/19 22:57:26, Lei Zhang wrote: > ...
4 years, 5 months ago (2016-07-19 23:39:41 UTC) #17
Lei Zhang
4 years, 5 months ago (2016-07-19 23:41:27 UTC) #18
Message was sent while issue was closed.
On 2016/07/19 23:39:41, Wei Li wrote:
>
https://codereview.chromium.org/2149903002/diff/120001/core/fxge/dib/fx_dib_m...
> File core/fxge/dib/fx_dib_main.cpp (right):
> 
>
https://codereview.chromium.org/2149903002/diff/120001/core/fxge/dib/fx_dib_m...
> core/fxge/dib/fx_dib_main.cpp:9: #include <algorithm>
> On 2016/07/19 22:57:26, Lei Zhang wrote:
> > C++ headers after C headers.
> 
> Will fix this style in next CL, thanks

No worries, thanks.

Powered by Google App Engine
This is Rietveld 408576698