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 40300: Implemented invalid UTF8 detection in decodeURI. (Closed)

Created:
11 years, 9 months ago by Christian Plesner Hansen
Modified:
9 years, 7 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Implemented invalid UTF8 detection in decodeURI. That is, detection of invalid utf8 not invalid utf8-detection.

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -22 lines) Patch
M src/regexp-delay.js View 1 chunk +0 lines, -4 lines 2 comments Download
M src/uri.js View 1 chunk +46 lines, -18 lines 2 comments Download
A test/mjsunit/regress/regress-244.js View 1 chunk +68 lines, -0 lines 4 comments Download

Messages

Total messages: 4 (0 generated)
Christian Plesner Hansen
11 years, 9 months ago (2009-03-09 17:58:16 UTC) #1
Christian Plesner Hansen
Oh and I forgot to mention: fixed a tiny inconsistency wrt. regexp function lengths.
11 years, 9 months ago (2009-03-09 17:58:53 UTC) #2
Lasse Reichstein
LGTM. http://codereview.chromium.org/40300/diff/1/2 File src/regexp-delay.js (right): http://codereview.chromium.org/40300/diff/1/2#newcode304 Line 304: Was the comment wrong, or has Firefox ...
11 years, 9 months ago (2009-03-10 07:25:03 UTC) #3
Christian Plesner Hansen
11 years, 9 months ago (2009-03-10 07:46:52 UTC) #4
http://codereview.chromium.org/40300/diff/1/2
File src/regexp-delay.js (right):

http://codereview.chromium.org/40300/diff/1/2#newcode304
Line 304: 
The comment was wrong in the sense that the spec does say something about the
length of exec and test.  I don't anticipate any compatibility issues.

http://codereview.chromium.org/40300/diff/1/3
File src/uri.js (right):

http://codereview.chromium.org/40300/diff/1/3#newcode93
Line 93: var value;
You only know if octets[2] exists when you've inspected octets[0] and octets[1]
so you can't declare those variables up front and declaring them along the way
makes the code more difficult to read.  But I'll see if I can refactor it
somehow to read properties less often.

It was hand written, thank you very much, but with no attempts of being smart
about anything because it's so easy to get wrong.

http://codereview.chromium.org/40300/diff/1/4
File test/mjsunit/regress/regress-244.js (right):

http://codereview.chromium.org/40300/diff/1/4#newcode61
Line 61: assertTrue(e instanceof URIError);
Fixed

http://codereview.chromium.org/40300/diff/1/4#newcode64
Line 64: assertTrue(threw);
Fixed

Powered by Google App Engine
This is Rietveld 408576698