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

Issue 2478653002: Don't initialize ICU replacement character for UTF-32 encodings (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, jungshik at Google, Mikhail
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't initialize ICU replacement character for UTF-32 encodings The TextCodecICU wrapper erroneously called ucnv_setSubstChars() with only a single byte replacement for non-byte-based encodings - basically the UTF-32 family. The code path is only exercised when computing names for files in form uploads. This would hit an ASSERT in debug builds, and result in an empty filename in release builds. BUG=662146, 417850 R=tkent@chromium.org Committed: https://crrev.com/2e2c129641218bcf03de40f74124a5c4f7c21f86 Cr-Commit-Position: refs/heads/master@{#430356}

Patch Set 1 #

Patch Set 2 : Add tests for TextEncoding methods #

Total comments: 1

Patch Set 3 : Don't use zero-length array initializer, to keep MSVC happy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -2 lines) Patch
M third_party/WebKit/Source/wtf/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/TextCodecICU.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/TextCodecICU.cpp View 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp View 1 2 2 chunks +36 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/TextEncoding.h View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/TextEncoding.cpp View 2 chunks +8 lines, -1 line 0 comments Download
A third_party/WebKit/Source/wtf/text/TextEncodingTest.cpp View 1 1 chunk +70 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 30 (19 generated)
jsbell
tkent@ - please take a look? I have not yet added a LayoutTest. It would ...
4 years, 1 month ago (2016-11-03 21:30:01 UTC) #3
jsbell
https://codereview.chromium.org/2478653002/diff/20001/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp File third_party/WebKit/Source/wtf/text/TextCodecICU.cpp (right): https://codereview.chromium.org/2478653002/diff/20001/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp#newcode614 third_party/WebKit/Source/wtf/text/TextCodecICU.cpp:614: if (!m_encoding.isNonByteBasedEncoding()) A side effect of correcting TextEncoding::isNonByteBasedEncoding() to ...
4 years, 1 month ago (2016-11-03 22:49:46 UTC) #6
tkent
lgtm. I think lacking a layout test is ok.
4 years, 1 month ago (2016-11-03 23:32:06 UTC) #9
jsbell
Bummer - MSVC doesn't like const uint_t data[] = {}; e:\b\c\b\win\src\third_party\webkit\source\wtf\text\textcodecicutest.cpp(47): error C2466: cannot allocate ...
4 years, 1 month ago (2016-11-03 23:33:39 UTC) #10
commit-bot: I haz the power
This CL has an open dependency (Issue 2464373006 Patch 20001). Please resolve the dependency and ...
4 years, 1 month ago (2016-11-04 16:04:59 UTC) #18
commit-bot: I haz the power
This CL has an open dependency (Issue 2464373006 Patch 20001). Please resolve the dependency and ...
4 years, 1 month ago (2016-11-04 17:05:16 UTC) #21
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/2478653002/40001
4 years, 1 month ago (2016-11-04 19:26:00 UTC) #23
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/325986)
4 years, 1 month ago (2016-11-05 01:18:37 UTC) #25
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/2478653002/40001
4 years, 1 month ago (2016-11-07 17:07:11 UTC) #27
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-07 20:18:07 UTC) #28
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 20:22:17 UTC) #30
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/2e2c129641218bcf03de40f74124a5c4f7c21f86
Cr-Commit-Position: refs/heads/master@{#430356}

Powered by Google App Engine
This is Rietveld 408576698