diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 18:09:12 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 18:09:12 +0000 |
commit | f963b1d5006ed35450befe042bf58810d9d36bea (patch) | |
tree | fe7f035ae7972e055f648fcf8e527f1e777c5984 /webkit/api/src/gtk | |
parent | cb5ea4db21261528710f13c5513e1143ca757386 (diff) | |
download | chromium_src-f963b1d5006ed35450befe042bf58810d9d36bea.zip chromium_src-f963b1d5006ed35450befe042bf58810d9d36bea.tar.gz chromium_src-f963b1d5006ed35450befe042bf58810d9d36bea.tar.bz2 |
Linux: Make SandboxIPCProcess not be a WebKitClient
Previously, SandboxIPCProcess had to be a full WebKitClient because of
the following assertion failure:
0 0x08af0a77 in buildBaseTextCodecMaps ()
at
third_party/WebKit/WebCore/platform/text/TextEncodingRegistry.cpp:176
1 0x08af0e73 in WebCore::atomicCanonicalTextEncodingName
(name=0x985d665 "UTF-8")
at
third_party/WebKit/WebCore/platform/text/TextEncodingRegistry.cpp:241
2 0x08aee811 in TextEncoding (this=0xb876ef8, name=0x985d665 "UTF-8")
at third_party/WebKit/WebCore/platform/text/TextEncoding.cpp:61
3 0x08aee88a in WebCore::UTF8Encoding ()
at third_party/WebKit/WebCore/platform/text/TextEncoding.cpp:266
4 0x08ae744c in WebCore::String::fromUTF8 (string=0x56d7a120
"�226\207�211�233正�221",
size=15) at third_party/WebKit/WebCore/platform/text/String.cpp:674
5 0x0872a7c0 in WebKit::WebString::fromUTF8 (data=0x56d7a120
"�226\207�211�233正�221",
length=15) at webkit/api/src/WebString.cpp:72
6 0x087245bd in WebKit::WebFontInfo::familyForChars
(characters=0x56c11628, numCharacters=1)
at webkit/api/src/gtk/WebFontInfo.cpp:98
7 0x0847599a in SandboxIPCProcess::HandleGetFontFamilyForChars
(this=0xff869ba8, fd=29,
pickle=@0xff86900c, iter=0xff869054, fds=@0xff86901c)
at chrome/browser/renderer_host/render_sandbox_host_linux.cc:215
8 0x08475d70 in SandboxIPCProcess::HandleRequestFromRenderer
(this=0xff869ba8, fd=29)
at chrome/browser/renderer_host/render_sandbox_host_linux.cc:115
9 0x08475fea in SandboxIPCProcess::Run (this=0xff869ba8)
at chrome/browser/renderer_host/render_sandbox_host_linux.cc:84
10 0x084747f9 in RenderSandboxHostLinux (this=0x56c10e78)
at chrome/browser/renderer_host/render_sandbox_host_linux.cc:299
This this patch, we remove the need to use WebString and the codec
translation (which was just a translation from UTF8 to UTF16 and back
again anyway) and thus can remove all of the WebKitClient gubbins.
BUG=17260
http://codereview.chromium.org/164112
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api/src/gtk')
-rw-r--r-- | webkit/api/src/gtk/WebFontInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/webkit/api/src/gtk/WebFontInfo.cpp b/webkit/api/src/gtk/WebFontInfo.cpp index 059ad4b..9365ed2 100644 --- a/webkit/api/src/gtk/WebFontInfo.cpp +++ b/webkit/api/src/gtk/WebFontInfo.cpp @@ -38,7 +38,7 @@ namespace WebKit { -WebString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCharacters) +WebCString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCharacters) { FcCharSet* cset = FcCharSetCreate(); for (int i = 0; i < numCharacters; ++i) { @@ -71,7 +71,7 @@ WebString WebFontInfo::familyForChars(const WebUChar* characters, size_t numChar FcCharSetDestroy(cset); if (!fontSet) - return WebString(); + return WebCString(); // Older versions of fontconfig have a bug where they cannot select // only scalable fonts so we have to manually filter the results. @@ -92,17 +92,17 @@ WebString WebFontInfo::familyForChars(const WebUChar* characters, size_t numChar continue; FcChar8* family; - WebString result; + WebCString result; if (FcPatternGetString(current, FC_FAMILY, 0, &family) == FcResultMatch) { const char* charFamily = reinterpret_cast<char*>(family); - result = WebString::fromUTF8(charFamily, strlen(charFamily)); + result = WebCString(charFamily, strlen(charFamily)); } FcFontSetDestroy(fontSet); return result; } FcFontSetDestroy(fontSet); - return WebString(); + return WebCString(); } } // namespace WebKit |