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

Issue 2464373006: Fix vector resize logic when encoding non-BMP chars to x-user-defined (Closed)

Created:
4 years, 1 month ago by jsbell
Modified:
4 years, 1 month ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-wtf_chromium.org, bsittler, chromium-reviews, jshin+watch_chromium.org, Mikhail
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix vector resize logic when encoding non-BMP chars to x-user-defined Since non-BMP characters take two UChars, when encoding to x-user-defined with replacement characters ('?') may result the output being shorter than the input. The encoding logic assumed the replacement would always be larger, and vectors don't like being shrunk. Correct the logic and make it more readable, add tests. BUG=661823 Committed: https://crrev.com/38d521c4ccc88c44de1d189c82b895c4a39f90c4 Cr-Commit-Position: refs/heads/master@{#429964}

Patch Set 1 #

Patch Set 2 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -9 lines) Patch
A + third_party/WebKit/LayoutTests/fast/encoding/x-user-defined-unencodables.html View 1 chunk +3 lines, -3 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/encoding/x-user-defined-unencodables-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M third_party/WebKit/Source/wtf/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp View 2 chunks +17 lines, -3 lines 0 comments Download
A + third_party/WebKit/Source/wtf/text/TextCodecUserDefinedTest.cpp View 4 chunks +11 lines, -4 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 24 (15 generated)
jsbell
tkent@ - please take a look? (mostly the same as the upstream patch)
4 years, 1 month ago (2016-11-03 00:15:29 UTC) #8
tkent
lgtm
4 years, 1 month ago (2016-11-03 12:14:25 UTC) #11
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/2464373006/20001
4 years, 1 month ago (2016-11-03 16:35:27 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/324676)
4 years, 1 month ago (2016-11-03 21:34:40 UTC) #15
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/2464373006/20001
4 years, 1 month ago (2016-11-03 21:44:58 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/325121)
4 years, 1 month ago (2016-11-04 01:49:45 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/2464373006/20001
4 years, 1 month ago (2016-11-04 17:05:43 UTC) #21
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-04 18:58:11 UTC) #22
commit-bot: I haz the power
4 years, 1 month ago (2016-11-04 19:18:39 UTC) #24
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/38d521c4ccc88c44de1d189c82b895c4a39f90c4
Cr-Commit-Position: refs/heads/master@{#429964}

Powered by Google App Engine
This is Rietveld 408576698