Bug 73950 - r102146 from 73875 broke fast/js/encode-URI-test.html
Summary: r102146 from 73875 broke fast/js/encode-URI-test.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks: 73875
  Show dependency treegraph
 
Reported: 2011-12-06 14:01 PST by Michael Saboff
Modified: 2011-12-06 14:42 PST (History)
0 users

See Also:


Attachments
Patch (3.30 KB, patch)
2011-12-06 14:27 PST, Michael Saboff
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2011-12-06 14:01:25 PST
Changeset r102146: <http://trac.webkit.org/changeset/102146> from https://bugs.webkit.org/show_bug.cgi?id=73875 "Add 8 bit paths to global object functions" causes fast/js/encode-URI-test.html to fail with the message 

--- /Volumes/Data/slave/snowleopard-intel-release-tests/build/layout-test-results/fast/js/encode-URI-test-expected.txt 
+++ /Volumes/Data/slave/snowleopard-intel-release-tests/build/layout-test-results/fast/js/encode-URI-test-actual.txt 
@@ -1,1 +1,3 @@
-Testing complete. No failures.
+called unescape on "%uxxxx" and got "uxxxx" instead of "%uxxxx"
+
+Testing complete. 1 tests failed.

The failure is due to the inner if () failing on line 653:

651:            const LChar* c = characters + k;
652:            if (c[0] == '%' && k <= len - 6 && c[1] == 'u') {
653: ==>            if (isASCIIHexDigit(c[2]) && isASCIIHexDigit(c[3]) && isASCIIHexDigit(c[4]) && isASCIIHexDigit(c[5])) {
654:                    builder.append(Lexer<UChar>::convertUnicode(c[2], c[3], c[4], c[5]));
655:                    k += 5;
656:                }
657:            } else if (c[0] == '%' && k <= len - 3 && isASCIIHexDigit(c[1]) && isASCIIHexDigit(c[2])) {
658:                builder.append(Lexer<LChar>::convertHex(c[1], c[2]));
659:                k += 2;
660:            } else
661:                builder.append(*c);
662:            k++;
663:        }        

When that if fails, as in the case of the string "%uxxxx", the percent does not get written out.

Patch in progress.
Comment 1 Michael Saboff 2011-12-06 14:27:26 PST
Created attachment 118112 [details]
Patch
Comment 2 Michael Saboff 2011-12-06 14:42:25 PST
Committed r102182: <http://trac.webkit.org/changeset/102182>