[Bug 22914] New: The stringbase64 uses string indexing which is not supported by the standard � but all browsers, except IE support it

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 18 07:33:23 PST 2008


https://bugs.webkit.org/show_bug.cgi?id=22914

           Summary: The stringbase64 uses string indexing which is not
                    supported by the standard – but all browsers, except IE
                    support it
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
               URL: http://www2.webkit.org/perf/sunspider-0.9/string-
                    base64.html
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P1
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: shreeshd at gmail.com


When you try to access a string like an array, non-IE browsers return the
character at that index but IE returns UNDEFINED.  The ES3.0 standard does not
support this so IE is actally behaving in a standard compliant way. However,
due to this, the test later performs string operations where the keyword
UNDEFINED gets converted to a string “UNDEFINED” which essentially has 8 more
characters that produces incorrect result on IE. It is a simple 1-line change
that does not does not affect time on other browsers, but produces correct time
for IE. Here is the proposed change:
var toBase64Table =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
to
var toBase64Table = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a',
'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6',
'7', '8', '9', '+', '/']


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list