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

Issue 745233002: Fix raw TemplateLiteral spans with non-ascii characters (Closed)

Created:
6 years, 1 month ago by caitp (gmail)
Modified:
6 years ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Project:
v8
Visibility:
Public.

Description

Fix raw TemplateLiteral spans with non-ascii characters BUG=v8:3710

Patch Set 1 #

Total comments: 5

Patch Set 2 : Use static Utf8Decoder, add more thorough unicode test case #

Patch Set 3 : Don't use Utf8Decoder::WriteUtf16 when length is 0 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -6 lines) Patch
M src/parser.cc View 1 2 1 chunk +17 lines, -3 lines 2 comments Download
M test/mjsunit/harmony/templates.js View 1 1 chunk +15 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (5 generated)
caitp (gmail)
On 2014/11/21 04:49:11, caitp wrote: > mailto:caitpotter88@gmail.com changed reviewers: > + mailto:arv@chromium.org, mailto:dslomov@chromium.org, mailto:rossberg@chromium.org It's ...
6 years, 1 month ago (2014-11-21 04:50:56 UTC) #2
arv (Not doing code reviews)
https://codereview.chromium.org/745233002/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/745233002/diff/1/src/parser.cc#newcode5306 src/parser.cc:5306: Vector<uint8_t> hash_string = Vector<uint8_t>::New(num_hash_chars); One thing that seems strange ...
6 years, 1 month ago (2014-11-21 06:12:49 UTC) #3
caitp (gmail)
On 2014/11/21 06:12:49, arv wrote: > https://codereview.chromium.org/745233002/diff/1/src/parser.cc > File src/parser.cc (right): > > https://codereview.chromium.org/745233002/diff/1/src/parser.cc#newcode5306 > ...
6 years, 1 month ago (2014-11-21 19:38:17 UTC) #4
Dmitry Lomov (no reviews)
Sorry for the late reply, I was travelling. Using rolling hash would be desirable, but ...
6 years ago (2014-11-25 13:16:21 UTC) #5
mathias
https://codereview.chromium.org/745233002/diff/1/test/mjsunit/harmony/templates.js File test/mjsunit/harmony/templates.js (right): https://codereview.chromium.org/745233002/diff/1/test/mjsunit/harmony/templates.js#newcode404 test/mjsunit/harmony/templates.js:404: assertEquals("안녕", callSites[1].raw[0]); May want to test UTF-8 encoded symbols ...
6 years ago (2014-11-25 14:45:00 UTC) #7
caitp (gmail)
There, hopefully that helps a bit https://codereview.chromium.org/745233002/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/745233002/diff/1/src/parser.cc#newcode5339 src/parser.cc:5339: unibrow::Utf8Decoder<256> decoder(raw_chars.get(), to_index); ...
6 years ago (2014-11-26 14:12:01 UTC) #8
Dmitry Lomov (no reviews)
lgtm
6 years ago (2014-11-26 15:58:47 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/745233002/20001
6 years ago (2014-11-26 15:59:42 UTC) #11
caitp (gmail)
On 2014/11/26 15:59:42, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years ago (2014-11-26 16:32:16 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/745233002/40001
6 years ago (2014-11-26 16:47:52 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years ago (2014-11-26 17:15:53 UTC) #15
marja
Some post-commit comments: https://codereview.chromium.org/745233002/diff/40001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/745233002/diff/40001/src/parser.cc#newcode5341 src/parser.cc:5341: decoder->Reset(raw_chars.get(), to_index); Since we're now doing ...
6 years ago (2014-12-01 15:54:00 UTC) #17
Dmitry Lomov (no reviews)
https://codereview.chromium.org/745233002/diff/40001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/745233002/diff/40001/src/parser.cc#newcode5341 src/parser.cc:5341: decoder->Reset(raw_chars.get(), to_index); On 2014/12/01 15:53:59, marja wrote: > Since ...
6 years ago (2014-12-01 16:09:48 UTC) #18
marja
6 years ago (2014-12-01 16:25:09 UTC) #19
Message was sent while issue was closed.
Though, I should untangle the code in such a way that Parser simply doesn't have
an Isolate in the cases where it shouldn't access it. But even then, this place
would maybe just crash if this gets called via the non-isolate-having code path.
I'll try to subconsciously think of a better solution.

(There are some cases where Parser *does* need an Isolate, and both that and the
background parsing case can end up in this code.)

Powered by Google App Engine
This is Rietveld 408576698