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

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed)

Created:
4 years, 8 months ago by Tom Sepez
Modified:
4 years, 8 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

Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Committed: https://pdfium.googlesource.com/pdfium/+/28f97ff783c16f3391384ce97b765ce4eb310ac7

Patch Set 1 #

Patch Set 2 : Better argument type for CFX_BinaryBuf::AppendString() #

Total comments: 2

Patch Set 3 : Fix unit tests. #

Total comments: 2

Patch Set 4 : Fix first windows build error. #

Patch Set 5 : Lei's comment. #

Patch Set 6 : Fix CPDF_Name::GetConstString() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+550 lines, -419 lines) Patch
M core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp View 12 chunks +18 lines, -12 lines 0 comments Download
M core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_font/fpdf_font.cpp View 3 chunks +6 lines, -6 lines 0 comments Download
M core/fpdfapi/fpdf_font/fpdf_font_cid.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_page/cpdf_allstates.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_page/fpdf_page_doc.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 1 2 3 4 5 8 chunks +16 lines, -12 lines 0 comments Download
M core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_name.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_number.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_parser.cpp View 1 chunk +4 lines, -3 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.cpp View 2 chunks +5 lines, -3 lines 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_string.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/fpdfapi/fpdf_parser/include/cpdf_object.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M core/fpdfdoc/cpvt_color.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfdoc/cpvt_fontmap.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M core/fpdfdoc/cpvt_generateap.cpp View 1 2 3 4 5 5 chunks +11 lines, -8 lines 0 comments Download
M core/fpdfdoc/doc_action.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M core/fpdfdoc/doc_annot.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M core/fpdfdoc/doc_basic.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M core/fpdfdoc/doc_bookmark.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M core/fpdfdoc/doc_form.cpp View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M core/fpdfdoc/doc_formcontrol.cpp View 5 chunks +11 lines, -9 lines 0 comments Download
M core/fpdfdoc/doc_formfield.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/fpdfdoc/doc_link.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M core/fpdfdoc/doc_ocg.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
M core/fpdfdoc/doc_tagged.cpp View 2 chunks +6 lines, -3 lines 0 comments Download
M core/fpdfdoc/doc_utils.cpp View 14 chunks +34 lines, -33 lines 0 comments Download
M core/fxcrt/fx_basic_buffer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fxcrt/fx_xml_parser.cpp View 3 chunks +4 lines, -3 lines 0 comments Download
M core/fxcrt/fxcrt_posix.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fxcrt/include/fx_basic.h View 1 2 chunks +8 lines, -2 lines 0 comments Download
M core/fxcrt/include/fx_string.h View 6 chunks +16 lines, -14 lines 0 comments Download
M core/fxge/ge/fx_ge_ps.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fxge/win32/fx_win32_device.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/formfiller/cba_fontmap.cpp View 4 chunks +9 lines, -9 lines 0 comments Download
M fpdfsdk/fpdf_ext.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M fpdfsdk/fpdf_flatten.cpp View 4 chunks +4 lines, -5 lines 0 comments Download
M fpdfsdk/fpdfppo.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M fpdfsdk/fsdk_baseannot.cpp View 1 chunk +5 lines, -7 lines 0 comments Download
M fpdfsdk/fsdk_baseform.cpp View 1 2 3 4 5 3 chunks +4 lines, -4 lines 0 comments Download
M fpdfsdk/fsdk_mgr.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/fxedit/fxet_pageobjs.cpp View 4 chunks +8 lines, -4 lines 0 comments Download
M fpdfsdk/pdfwindow/PWL_Edit.cpp View 8 chunks +17 lines, -9 lines 0 comments Download
M fpdfsdk/pdfwindow/PWL_Icon.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/pdfwindow/PWL_Label.cpp View 2 chunks +5 lines, -3 lines 0 comments Download
M fpdfsdk/pdfwindow/PWL_ListBox.cpp View 1 chunk +9 lines, -5 lines 0 comments Download
M fpdfsdk/pdfwindow/PWL_ScrollBar.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M fpdfsdk/pdfwindow/PWL_Signature.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fee/fde_txtedtengine.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M xfa/fgas/localization/fgas_locale.cpp View 4 chunks +16 lines, -13 lines 0 comments Download
M xfa/fwl/basewidget/fwl_editimp.cpp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M xfa/fxbarcode/oned/BC_OnedCodaBarReader.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M xfa/fxfa/app/xfa_checksum.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fxfa/app/xfa_fftextedit.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/fxfa/app/xfa_fontmgr.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M xfa/fxfa/fm2js/xfa_fm2jscontext.cpp View 85 chunks +184 lines, -132 lines 0 comments Download
M xfa/fxfa/parser/xfa_locale.cpp View 3 chunks +7 lines, -4 lines 0 comments Download
M xfa/fxfa/parser/xfa_object_imp.cpp View 30 chunks +54 lines, -38 lines 0 comments Download
M xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp View 13 chunks +15 lines, -13 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
Tom Sepez
Lei, for review, when you get a chance. Thanks.
4 years, 8 months ago (2016-04-04 19:14:46 UTC) #2
Lei Zhang
Needs a bit more work to get the trybots green. https://codereview.chromium.org/1853233002/diff/20001/core/fpdfdoc/doc_form.cpp File core/fpdfdoc/doc_form.cpp (right): https://codereview.chromium.org/1853233002/diff/20001/core/fpdfdoc/doc_form.cpp#newcode346 ...
4 years, 8 months ago (2016-04-04 22:11:29 UTC) #3
Tom Sepez
https://codereview.chromium.org/1853233002/diff/20001/core/fpdfdoc/doc_form.cpp File core/fpdfdoc/doc_form.cpp (right): https://codereview.chromium.org/1853233002/diff/20001/core/fpdfdoc/doc_form.cpp#newcode346 core/fpdfdoc/doc_form.cpp:346: if (!pDict->KeyExist((csTmp + bsNum).AsByteStringC())) { On 2016/04/04 22:11:29, Lei ...
4 years, 8 months ago (2016-04-04 22:54:39 UTC) #4
Lei Zhang
lgtm https://codereview.chromium.org/1853233002/diff/40001/core/fpdfapi/fpdf_parser/cpdf_string.cpp File core/fpdfapi/fpdf_parser/cpdf_string.cpp (right): https://codereview.chromium.org/1853233002/diff/40001/core/fpdfapi/fpdf_parser/cpdf_string.cpp#newcode35 core/fpdfapi/fpdf_parser/cpdf_string.cpp:35: return m_String.AsByteStringC(); Fix CPDF_Name::GetConstString() as well?
4 years, 8 months ago (2016-04-04 22:59:04 UTC) #5
Tom Sepez
https://codereview.chromium.org/1853233002/diff/40001/core/fpdfapi/fpdf_parser/cpdf_string.cpp File core/fpdfapi/fpdf_parser/cpdf_string.cpp (right): https://codereview.chromium.org/1853233002/diff/40001/core/fpdfapi/fpdf_parser/cpdf_string.cpp#newcode35 core/fpdfapi/fpdf_parser/cpdf_string.cpp:35: return m_String.AsByteStringC(); On 2016/04/04 22:59:04, Lei Zhang wrote: > ...
4 years, 8 months ago (2016-04-04 23:24:28 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1853233002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1853233002/100001
4 years, 8 months ago (2016-04-04 23:24:40 UTC) #9
commit-bot: I haz the power
4 years, 8 months ago (2016-04-04 23:41:40 UTC) #11
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://pdfium.googlesource.com/pdfium/+/28f97ff783c16f3391384ce97b765ce4eb31...

Powered by Google App Engine
This is Rietveld 408576698