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

Issue 662003003: Script streaming: more UTF-8 handing fixes (again). (Closed)

Created:
6 years, 2 months ago by marja
Modified:
6 years, 2 months ago
Reviewers:
Yang
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Script streaming: more UTF-8 handing fixes (again). 1) Since we fill the output buffer both from the chunks and the conversion buffer, it's possible that we run out of space and call CopyCharsHelper with 0 length. The underlying functions don't handle it gracefully, so check there. 2) There was a bug where we used to try to copy too many characters from the beginning of the data chunk into the conversion buffer. Continuation bytes in UTF-8 are of the form 0b10XXXXXX. If a byte is bigger than that, it's the first byte of a new UTF-8 character and we should ignore it. These two together (or maybe in combination with surrogates) are a probable reason for crbug.com/420932. 3) The test data was off; \uc481 is \xec\x92\x81. BUG=420932 LOG=N R=yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=24725

Patch Set 1 #

Patch Set 2 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -22 lines) Patch
M src/scanner-character-streams.cc View 2 chunks +14 lines, -3 lines 0 comments Download
M test/cctest/test-api.cc View 14 chunks +40 lines, -19 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
marja
yangguo@, I unfortunately had to fix the UTF-8 handling once more, PTAL.
6 years, 2 months ago (2014-10-17 14:14:03 UTC) #2
Yang
On 2014/10/17 14:14:03, marja wrote: > yangguo@, I unfortunately had to fix the UTF-8 handling ...
6 years, 2 months ago (2014-10-20 08:29:40 UTC) #3
marja
6 years, 2 months ago (2014-10-20 09:23:53 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 24725 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698