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

Issue 2347993002: Clean up CPDF_Stream. (Closed)

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

Description

Clean up CPDF_Stream. Replace the CPDF_Stream(nullptr, 0, nullptr) pattern with a default ctor. Remove unused parameters from CPDF_Stream::SetData(). Both are always passed as FALSE. CPDF_Stream declared its own m_GenNum, which shadowed the one in CPDF_Object. It was used only to distinguish file/memory streams, so add a bool explicitly for this purpose. Remove the union, it would be sad if we confused user data with a C++ object with virtual function calls. Use unique_ptrs with appropriate deleters to manage memory. Committed: https://pdfium.googlesource.com/pdfium/+/e6db16e7e6cdc3dd213c16de0d792b77656ac7a6

Patch Set 1 #

Patch Set 2 : More tweaks #

Patch Set 3 : ctor #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -113 lines) Patch
M core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp View 1 2 3 chunks +11 lines, -7 lines 0 comments Download
M core/fpdfapi/fpdf_page/cpdf_image.cpp View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_stream.cpp View 1 2 3 chunks +32 lines, -61 lines 0 comments Download
M core/fpdfapi/fpdf_parser/include/cpdf_stream.h View 1 2 3 chunks +14 lines, -19 lines 1 comment Download
M core/fpdfdoc/cpvt_generateap.cpp View 1 2 4 chunks +4 lines, -8 lines 0 comments Download
M fpdfsdk/cpdfsdk_baannot.cpp View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M fpdfsdk/formfiller/cba_fontmap.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/fpdf_flatten.cpp View 4 chunks +4 lines, -5 lines 0 comments Download
M fpdfsdk/fpdf_transformpage.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M fpdfsdk/fpdfsave.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (18 generated)
Tom Sepez
Dan, for review.
4 years, 3 months ago (2016-09-16 22:06:58 UTC) #4
dsinclair
lgtm w/ nit https://codereview.chromium.org/2347993002/diff/40001/core/fpdfapi/fpdf_parser/include/cpdf_stream.h File core/fpdfapi/fpdf_parser/include/cpdf_stream.h (right): https://codereview.chromium.org/2347993002/diff/40001/core/fpdfapi/fpdf_parser/include/cpdf_stream.h#newcode22 core/fpdfapi/fpdf_parser/include/cpdf_stream.h:22: CPDF_Stream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict); ...
4 years, 3 months ago (2016-09-19 13:12:19 UTC) #18
Tom Sepez
On 2016/09/19 13:12:19, dsinclair wrote: > lgtm w/ nit > > https://codereview.chromium.org/2347993002/diff/40001/core/fpdfapi/fpdf_parser/include/cpdf_stream.h > File core/fpdfapi/fpdf_parser/include/cpdf_stream.h ...
4 years, 3 months ago (2016-09-19 16:49:17 UTC) #19
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/2347993002/40001
4 years, 3 months ago (2016-09-19 16:49:29 UTC) #21
commit-bot: I haz the power
4 years, 3 months ago (2016-09-19 17:45:12 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://pdfium.googlesource.com/pdfium/+/e6db16e7e6cdc3dd213c16de0d792b77656a...

Powered by Google App Engine
This is Rietveld 408576698