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

Issue 860973002: Simplify UTF16LE_Encode and add unittest. (Closed)

Created:
5 years, 11 months ago by Bo Xu
Modified:
5 years, 11 months ago
Reviewers:
Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Simplify UTF16LE_Encode and add unittest. Previously, UTF16LE_Encode take an optional flag to indicate if the returned byte string has trailing zeros. In fact, no where needs the flag to be false. So just get rid of it so callers won't misuse. The bug is found by https://codereview.chromium.org/837723009 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/0185408126529d5df7e095c5789affd4ae971375

Patch Set 1 #

Patch Set 2 : Add unittest #

Patch Set 3 : Format #

Total comments: 6

Patch Set 4 : use struct, fix test case #

Patch Set 5 : tab #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -25 lines) Patch
M BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M core/include/fxcrt/fx_string.h View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxcrt/fx_basic_wstring.cpp View 1 chunk +6 lines, -10 lines 0 comments Download
A core/src/fxcrt/fx_basic_wstring_unittest.cpp View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
M fpdfsdk/src/fpdfdoc.cpp View 2 chunks +5 lines, -10 lines 0 comments Download
M fpdfsdk/src/fpdfview.cpp View 1 chunk +2 lines, -4 lines 0 comments Download
M pdfium.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
Bo Xu
Hi Tom, please review this one.
5 years, 11 months ago (2015-01-21 00:03:07 UTC) #2
Tom Sepez
On 2015/01/21 00:03:07, Bo Xu wrote: > Hi Tom, please review this one. Sounds good ...
5 years, 11 months ago (2015-01-21 00:08:39 UTC) #3
Tom Sepez
> And by copy over, I mean you can remove the existing tests for wstring ...
5 years, 11 months ago (2015-01-21 00:16:03 UTC) #4
Bo Xu
On 2015/01/21 00:16:03, Tom Sepez wrote: > > And by copy over, I mean you ...
5 years, 11 months ago (2015-01-21 07:59:20 UTC) #5
Tom Sepez
Outstanding. https://codereview.chromium.org/860973002/diff/40001/core/src/fxcrt/fx_basic_wstring_unittest.cpp File core/src/fxcrt/fx_basic_wstring_unittest.cpp (right): https://codereview.chromium.org/860973002/diff/40001/core/src/fxcrt/fx_basic_wstring_unittest.cpp#newcode15 core/src/fxcrt/fx_basic_wstring_unittest.cpp:15: L"23\0456", beware of tailing digits following a \0, ...
5 years, 11 months ago (2015-01-21 18:15:55 UTC) #6
Bo Xu
https://codereview.chromium.org/860973002/diff/40001/core/src/fxcrt/fx_basic_wstring_unittest.cpp File core/src/fxcrt/fx_basic_wstring_unittest.cpp (right): https://codereview.chromium.org/860973002/diff/40001/core/src/fxcrt/fx_basic_wstring_unittest.cpp#newcode15 core/src/fxcrt/fx_basic_wstring_unittest.cpp:15: L"23\0456", On 2015/01/21 18:15:54, Tom Sepez wrote: > beware ...
5 years, 11 months ago (2015-01-21 19:23:55 UTC) #7
Tom Sepez
lgtm
5 years, 11 months ago (2015-01-21 20:01:54 UTC) #8
Bo Xu
5 years, 11 months ago (2015-01-21 20:17:17 UTC) #9
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
0185408126529d5df7e095c5789affd4ae971375 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698