[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 15:17:33 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 8a78ae5f4912b92106e4392afebe3dd28c03f7c8
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 22:15:03 2010 +0000
2010-10-29 Carlos Garcia Campos <cgarcia at igalia.com>
Reviewed by Andreas Kling.
[GTK] Crash in TextEncoding.cpp when using glib unicode
https://bugs.webkit.org/show_bug.cgi?id=48521
When the conversion to UTF-8 fails, try to encode the original string
without normalizing. Fixes tests cases:
fast/url/anchor.html
fast/url/query.html
fast/url/standard-url.html
* platform/text/TextEncoding.cpp:
(WebCore::TextEncoding::encode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f0e7586..aeb92c0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-29 Carlos Garcia Campos <cgarcia at igalia.com>
+
+ Reviewed by Andreas Kling.
+
+ [GTK] Crash in TextEncoding.cpp when using glib unicode
+ https://bugs.webkit.org/show_bug.cgi?id=48521
+
+ When the conversion to UTF-8 fails, try to encode the original string
+ without normalizing. Fixes tests cases:
+ fast/url/anchor.html
+ fast/url/query.html
+ fast/url/standard-url.html
+
+ * platform/text/TextEncoding.cpp:
+ (WebCore::TextEncoding::encode):
+
2010-10-29 Benjamin Poulain <benjamin.poulain at nokia.com>
Reviewed by Antonio Gomes.
diff --git a/WebCore/platform/text/TextEncoding.cpp b/WebCore/platform/text/TextEncoding.cpp
index 921ceeb..58e691f 100644
--- a/WebCore/platform/text/TextEncoding.cpp
+++ b/WebCore/platform/text/TextEncoding.cpp
@@ -120,6 +120,10 @@ CString TextEncoding::encode(const UChar* characters, size_t length, Unencodable
#elif USE(GLIB_UNICODE)
GOwnPtr<char> UTF8Source;
UTF8Source.set(g_utf16_to_utf8(characters, length, 0, 0, 0));
+ if (!UTF8Source) {
+ // If conversion to UTF-8 failed, try with the string without normalization
+ return newTextCodec(*this)->encode(characters, length, handling);
+ }
GOwnPtr<char> UTF8Normalized;
UTF8Normalized.set(g_utf8_normalize(UTF8Source.get(), -1, G_NORMALIZE_NFC));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list