|
|
Handle odd data lengths in UTF-16 decoder
The UTF-16 decoder was silently dropping ignoring odd byte lengths.
Per the Encoding standard, it should emit U+FFFD (replacement char),
and set the error flag for interested callers.
This makes TextDecoder match the behavior in Firefox.
BUG= 277035
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168763
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+151 lines, -62 lines) |
Patch |
 |
M |
LayoutTests/fast/encoding/api/end-of-file.html
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+15 lines, -6 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fast/encoding/api/end-of-file-expected.txt
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+15 lines, -8 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fast/encoding/api/fatal-flag-expected.txt
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/encoding/char-decoding-truncated.html
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/encoding/char-decoding-truncated-expected.txt
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fast/encoding/resources/char-decoding-utils.js
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+2 lines, -14 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/Document.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/html/parser/TextResourceDecoder.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/modules/encoding/TextDecoder.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodec.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+18 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecICU.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecICU.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecLatin1.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecLatin1.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecUTF16.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecUTF16.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+25 lines, -10 lines |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecUTF8.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecUTF8.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecUTF8Test.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecUserDefined.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextCodecUserDefined.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/wtf/text/TextEncoding.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 39 (0 generated)
|