Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(1)

Issue 261013007: Prevent direct use of "replacement" text encoding. (Closed)

Created:
6 years, 3 months ago by jsbell
Modified:
6 years, 3 months ago
CC:
blink-reviews, blink-reviews-wtf_chromium.org, Mikhail, adamk+blink_chromium.org, abarth-chromium
Visibility:
Public.

Description

Prevent direct use of "replacement" text encoding. The "replacement" encoding defined in the WHATWG Encoding Standard is a spec convenience, and not intended to be referenced directly. There are several aliases for it (for some legacy encodings) but neither content nor script should be able to use it by name. Since most of wtf/text assumes that a codec's name is an alias for itself, leave that invariant intact. Make TextEncoding (the API for resolving an encoding by name) mark a direct reference as invalid, (treating it as any other unknown string, i.e. use locale's default codec) and throw if the name is used from script (per spec) This is dependent on http://crrev.com/265973003 BUG=277037 R=jshin@chromium.org,eseidel@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174047

Patch Set 1 #

Patch Set 2 : Rebase cleanup #

Patch Set 3 : Encoding fix for expected file #

Patch Set 4 : MSVC fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -28 lines) Patch
A LayoutTests/fast/encoding/api/replacement-encoding.html View 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/fast/encoding/api/replacement-encoding-expected.txt View 1 chunk +9 lines, -0 lines 0 comments Download
M LayoutTests/fast/encoding/charset-replacement-expected.txt View 1 2 1 chunk +5 lines, -7 lines 0 comments Download
D LayoutTests/platform/linux/fast/encoding/charset-replacement-expected.png View 1 Binary file 0 comments Download
D LayoutTests/platform/mac/fast/encoding/charset-replacement-expected.png View 1 Binary file 0 comments Download
D LayoutTests/platform/mac/fast/encoding/charset-replacement-expected.txt View 1 1 chunk +0 lines, -7 lines 0 comments Download
D LayoutTests/platform/win-xp/fast/encoding/charset-replacement-expected.png View 1 Binary file 0 comments Download
D LayoutTests/platform/win-xp/fast/encoding/charset-replacement-expected.txt View 1 1 chunk +0 lines, -7 lines 0 comments Download
D LayoutTests/platform/win/fast/encoding/charset-replacement-expected.png View 1 Binary file 0 comments Download
M Source/modules/encoding/TextDecoder.cpp View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M Source/wtf/text/TextCodecReplacement.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/wtf/text/TextCodecReplacementTest.cpp View 1 chunk +3 lines, -4 lines 0 comments Download
M Source/wtf/text/TextEncoding.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/wtf/text/TextEncodingRegistry.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/wtf/text/TextEncodingRegistry.cpp View 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
jsbell
This is part 3 of 3. The full sequence is: 1. API/test cleanup - https://codereview.chromium.org/269593009 ...
6 years, 3 months ago (2014-05-02 18:39:48 UTC) #1
eseidel
lgtm
6 years, 3 months ago (2014-05-09 06:41:11 UTC) #2
jsbell
The CQ bit was checked by jsbell@chromium.org
6 years, 3 months ago (2014-05-14 20:27:00 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jsbell@chromium.org/261013007/60001
6 years, 3 months ago (2014-05-14 20:27:27 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 3 months ago (2014-05-14 21:39:06 UTC) #5
commit-bot: I haz the power
6 years, 3 months ago (2014-05-14 22:12:42 UTC) #6
Message was sent while issue was closed.
Change committed as 174047

Powered by Google App Engine
This is Rietveld 408576698