From 36623478c63110bd41326d1a0425b0f331db96ac Mon Sep 17 00:00:00 2001
From: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Date: Mon, 13 Jan 2014 17:22:44 +0100
Subject: [PATCH] Fix ContentMain calling in processMain for Windows

ContentMain has a different parameter list for Windows.
Currently no sandbox is in use, just fitting in with the required
parameters. See chromium/content/app/content_main.cc.

Change-Id: I6c3918efaafbf48bd4a07f377be51c22c5355cd0
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
---
 src/core/process_main.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/core/process_main.cpp b/src/core/process_main.cpp
index a8c1b3ad5..56a79cb13 100644
--- a/src/core/process_main.cpp
+++ b/src/core/process_main.cpp
@@ -43,12 +43,23 @@
 
 #include "content_main_delegate_qt.h"
 #include "content/public/app/content_main.h"
+#if defined(OS_WIN)
+#include "sandbox/win/src/sandbox_types.h"
+#include "content/public/app/startup_helper_win.h"
+#endif // OS_WIN
 
 namespace QtWebEngine {
 
 int processMain(int argc, const char **argv)
 {
+#if defined(OS_WIN)
+    HINSTANCE instance_handle = NULL;
+    sandbox::SandboxInterfaceInfo sandbox_info = {0};
+    content::InitializeSandboxInfo(&sandbox_info);
+    return content::ContentMain(instance_handle, &sandbox_info, new ContentMainDelegateQt);
+#else
     return content::ContentMain(argc, argv, new ContentMainDelegateQt);
+#endif // OS_WIN
 }
 
 }
-- 
GitLab