50 lines
1.9 KiB
Plaintext
50 lines
1.9 KiB
Plaintext
$OpenBSD: patch-content_renderer_renderer_main_cc,v 1.11 2017/12/04 13:55:42 robert Exp $
|
|
Index: content/renderer/renderer_main.cc
|
|
--- content/renderer/renderer_main.cc.orig
|
|
+++ content/renderer/renderer_main.cc
|
|
@@ -34,6 +34,7 @@
|
|
#include "ppapi/features/features.h"
|
|
#include "third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h"
|
|
#include "third_party/skia/include/core/SkGraphics.h"
|
|
+#include "third_party/skia/include/ports/SkFontConfigInterface.h"
|
|
#include "ui/base/ui_base_switches.h"
|
|
|
|
#if defined(OS_ANDROID)
|
|
@@ -68,6 +69,12 @@
|
|
#include "ui/ozone/public/client_native_pixmap_factory_ozone.h"
|
|
#endif
|
|
|
|
+#if defined(OS_BSD)
|
|
+#include "content/browser/renderer_host/render_sandbox_host_linux.h"
|
|
+#include "content/common/font_config_ipc_linux.h"
|
|
+#include "content/common/sandbox_linux/sandbox_linux.h"
|
|
+#endif
|
|
+
|
|
namespace content {
|
|
namespace {
|
|
// This function provides some ways to test crash and assertion handling
|
|
@@ -191,9 +198,13 @@ int RendererMain(const MainFunctionParams& parameters)
|
|
// is OK.
|
|
InitializeWebRtcModule();
|
|
#endif
|
|
+#if defined(OS_BSD)
|
|
+ SkFontConfigInterface::SetGlobal(
|
|
+ new FontConfigIPC(GetSandboxFD()))->unref();
|
|
+#endif
|
|
|
|
{
|
|
-#if defined(OS_WIN) || defined(OS_MACOSX)
|
|
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
|
|
// TODO(markus): Check if it is OK to unconditionally move this
|
|
// instruction down.
|
|
auto render_process = RenderProcessImpl::Create();
|
|
@@ -203,7 +214,7 @@ int RendererMain(const MainFunctionParams& parameters)
|
|
bool run_loop = true;
|
|
if (!no_sandbox)
|
|
run_loop = platform.EnableSandbox();
|
|
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
|
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
|
|
auto render_process = RenderProcessImpl::Create();
|
|
RenderThreadImpl::Create(std::move(main_message_loop),
|
|
std::move(renderer_scheduler));
|