[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
mjs at apple.com
mjs at apple.com
Tue Jan 5 23:48:43 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 432261d8e9651ba3c4271bbc35df2cfeb1fc6e05
Author: mjs at apple.com <mjs at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 14 02:38:22 2009 +0000
2009-12-13 Eric Seidel <eric at webkit.org>
Reviewed by Gavin Barraclough.
string-base64 test does not compute a valid base64 string
http://bugs.webkit.org/show_bug.cgi?id=16806
* tests/string-base64.js: change str[i] to str.charCodeAt(i)
2009-12-13 Maciej Stachowiak <mjs at apple.com>
Reviewed by Gavin Barraclough.
SunSpider/tests/string-base64.js does not compute a valid base64 encoded string
https://bugs.webkit.org/show_bug.cgi?id=16806
Based on a patch by Eric Seidel.
Fix the base64 computation to actually compute correct results. The impact on runtime of
the test is pretty small, but noticeable for some browsers. But at least it's not
doing a wrong and meaningless computation any more.
* tests/sunspider-0.9.1/string-base64.js:
():
(base64ToString):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/ChangeLog b/ChangeLog
index 16d2dd9..98d5de4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-12-13 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ string-base64 test does not compute a valid base64 string
+ http://bugs.webkit.org/show_bug.cgi?id=16806
+
+ * tests/string-base64.js: change str[i] to str.charCodeAt(i)
+
2009-12-10 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog
index be7c393..f96ef41 100644
--- a/SunSpider/ChangeLog
+++ b/SunSpider/ChangeLog
@@ -1,5 +1,22 @@
2009-12-13 Maciej Stachowiak <mjs at apple.com>
+ Reviewed by Gavin Barraclough.
+
+ SunSpider/tests/string-base64.js does not compute a valid base64 encoded string
+ https://bugs.webkit.org/show_bug.cgi?id=16806
+
+ Based on a patch by Eric Seidel.
+
+ Fix the base64 computation to actually compute correct results. The impact on runtime of
+ the test is pretty small, but noticeable for some browsers. But at least it's not
+ doing a wrong and meaningless computation any more.
+
+ * tests/sunspider-0.9.1/string-base64.js:
+ ():
+ (base64ToString):
+
+2009-12-13 Maciej Stachowiak <mjs at apple.com>
+
Fixing commit error...
I accidentally committed my last patch in a form that broke Web-hosted SunSpider. Fixing.
diff --git a/SunSpider/tests/sunspider-0.9.1/string-base64.js b/SunSpider/tests/sunspider-0.9.1/string-base64.js
index c9f3a7b..dfc949f 100644
--- a/SunSpider/tests/sunspider-0.9.1/string-base64.js
+++ b/SunSpider/tests/sunspider-0.9.1/string-base64.js
@@ -48,22 +48,22 @@ function toBase64(data) {
var i;
// Convert every three bytes to 4 ascii characters.
for (i = 0; i < (length - 2); i += 3) {
- result += toBase64Table[data[i] >> 2];
- result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)];
- result += toBase64Table[((data[i+1] & 0x0f) << 2) + (data[i+2] >> 6)];
- result += toBase64Table[data[i+2] & 0x3f];
+ result += toBase64Table[data.charCodeAt(i) >> 2];
+ result += toBase64Table[((data.charCodeAt(i) & 0x03) << 4) + (data.charCodeAt(i+1) >> 4)];
+ result += toBase64Table[((data.charCodeAt(i+1) & 0x0f) << 2) + (data.charCodeAt(i+2) >> 6)];
+ result += toBase64Table[data.charCodeAt(i+2) & 0x3f];
}
// Convert the remaining 1 or 2 bytes, pad out to 4 characters.
if (length%3) {
i = length - (length%3);
- result += toBase64Table[data[i] >> 2];
+ result += toBase64Table[data.charCodeAt(i) >> 2];
if ((length%3) == 2) {
- result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)];
- result += toBase64Table[(data[i+1] & 0x0f) << 2];
+ result += toBase64Table[((data.charCodeAt(i) & 0x03) << 4) + (data.charCodeAt(i+1) >> 4)];
+ result += toBase64Table[(data.charCodeAt(i+1) & 0x0f) << 2];
result += base64Pad;
} else {
- result += toBase64Table[(data[i] & 0x03) << 4];
+ result += toBase64Table[(data.charCodeAt(i) & 0x03) << 4];
result += base64Pad + base64Pad;
}
}
@@ -91,7 +91,7 @@ function base64ToString(data) {
// Convert one by one.
for (var i = 0; i < data.length; i++) {
var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
- var padding = (data[i] == base64Pad);
+ var padding = (data.charCodeAt(i) == base64Pad.charCodeAt(0));
// Skip illegal characters and whitespace
if (c == -1) continue;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list