summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_sandbox_support_linux.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 00:47:05 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 00:47:05 +0000
commite00f9da2250748213690b3586fc08a60e989b58f (patch)
tree6a4f3e9cfeb43eaa442e85ffd6c1ed371f6d523a /chrome/renderer/renderer_sandbox_support_linux.cc
parent0fbf0fe469cdd79468e97bd144fb4380e5dab2ef (diff)
downloadchromium_src-e00f9da2250748213690b3586fc08a60e989b58f.zip
chromium_src-e00f9da2250748213690b3586fc08a60e989b58f.tar.gz
chromium_src-e00f9da2250748213690b3586fc08a60e989b58f.tar.bz2
Linux: fix font fallback for charactors missing from the primary font.
We are using the sandbox host for font fallback now via the WebKit API. However, a patch landed in WebKit which added an assertion about being on the correct thread. Since the sandbox host was using WebString::fromUTF8, we hit the assertion and died. So, we have to implement a WebKitClient for the sandbox host. We cannot just pass in NULL because there's an assertion that it's non-NULL. Also, we cannot pass in a bogus pointer because it actually ends up getting called back. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_sandbox_support_linux.cc')
-rw-r--r--chrome/renderer/renderer_sandbox_support_linux.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/renderer/renderer_sandbox_support_linux.cc b/chrome/renderer/renderer_sandbox_support_linux.cc
index 29fe183..a08fff1 100644
--- a/chrome/renderer/renderer_sandbox_support_linux.cc
+++ b/chrome/renderer/renderer_sandbox_support_linux.cc
@@ -4,8 +4,10 @@
#include "chrome/renderer/renderer_sandbox_support_linux.h"
+#include "base/global_descriptors_posix.h"
#include "base/pickle.h"
#include "base/unix_domain_socket_posix.h"
+#include "chrome/common/chrome_descriptors.h"
#include "chrome/common/sandbox_methods_linux.h"
namespace renderer_sandbox_support {
@@ -18,8 +20,9 @@ std::string getFontFamilyForCharacters(const uint16_t* utf16, size_t num_utf16)
request.WriteUInt32(utf16[i]);
uint8_t buf[512];
- static const int kMagicSandboxFD = 4;
- const ssize_t n = base::SendRecvMsg(kMagicSandboxFD, buf, sizeof(buf), NULL,
+ const int sandbox_fd =
+ kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor;
+ const ssize_t n = base::SendRecvMsg(sandbox_fd, buf, sizeof(buf), NULL,
request);
std::string family_name;