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

Issue 1862953004: Make CFX_WideString::FromLocal() take a CFX_ByteStringC arg (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 CFX_WideString::FromLocal() take a CFX_ByteStringC arg It doesn't persist the string beyond the duration of the call, hence it should take the *StringC variant. Doing so avoids some allocs by changing to the *StringC ctor in a few places, at the cost of some explicit .ToByteStringC() calls (which are cheap). Committed: https://pdfium.googlesource.com/pdfium/+/8b36e5cc3d5f5f579c6b060e2c40b896a4b02bc0

Patch Set 1 #

Patch Set 2 : Propogate into CFX_CharMap methods, avoid silent alloc. #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Use GetConstStringBy(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -29 lines) Patch
M core/fpdfdoc/doc_action.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M core/fpdfdoc/doc_basic.cpp View 1 2 3 1 chunk +9 lines, -5 lines 0 comments Download
M core/fpdfdoc/doc_form.cpp View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M core/fxcrt/fx_basic_bstring.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M core/fxcrt/fx_basic_wstring.cpp View 1 2 3 chunks +7 lines, -6 lines 0 comments Download
M core/fxcrt/fx_extension.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fxcrt/include/fx_basic.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M core/fxcrt/include/fx_string.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/fsdk_mgr.cpp View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M fpdfsdk/javascript/PublicMethods.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M xfa/fgas/font/fgas_gefont.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M xfa/fxbarcode/BC_UtilCodingConvert.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (6 generated)
Tom Sepez
Lei, please review.
4 years, 8 months ago (2016-04-06 20:51:18 UTC) #2
Lei Zhang
lgtm https://codereview.chromium.org/1862953004/diff/20001/core/fpdfdoc/doc_basic.cpp File core/fpdfdoc/doc_basic.cpp (right): https://codereview.chromium.org/1862953004/diff/20001/core/fpdfdoc/doc_basic.cpp#newcode319 core/fpdfdoc/doc_basic.cpp:319: CFX_WideString::FromLocal(pDict->GetStringBy("F").AsByteStringC()); Use GetConstStringBy() instead?
4 years, 8 months ago (2016-04-07 19:21:59 UTC) #5
Tom Sepez
https://codereview.chromium.org/1862953004/diff/20001/core/fpdfdoc/doc_basic.cpp File core/fpdfdoc/doc_basic.cpp (right): https://codereview.chromium.org/1862953004/diff/20001/core/fpdfdoc/doc_basic.cpp#newcode319 core/fpdfdoc/doc_basic.cpp:319: CFX_WideString::FromLocal(pDict->GetStringBy("F").AsByteStringC()); On 2016/04/07 19:21:59, Lei Zhang wrote: > Use ...
4 years, 8 months ago (2016-04-08 15:47:29 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1862953004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1862953004/60001
4 years, 8 months ago (2016-04-08 15:47:42 UTC) #9
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 16:00:40 UTC) #11
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://pdfium.googlesource.com/pdfium/+/8b36e5cc3d5f5f579c6b060e2c40b896a4b0...

Powered by Google App Engine
This is Rietveld 408576698