From 241d93d1296e495da517523c2ae3141c11225fad Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Sun, 27 Oct 2013 13:22:09 +0200 Subject: [PATCH] Let's try and get #159 working. I had to comment out this part (which was also highly non-functional...) earlier because it caused stability problems, since CEF starts up more than 1 child process sometimes (which caused problems). I think we might have to distinguish between different process types here, which is why we start fiddling around with the arguments. Perhaps there are other, better ways to detect the current process type though. --- CefSharp.BrowserSubprocess/CefRenderProcess.h | 7 +++---- CefSharp.BrowserSubprocess/Program.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CefSharp.BrowserSubprocess/CefRenderProcess.h b/CefSharp.BrowserSubprocess/CefRenderProcess.h index 83d4daa89..1a53dd2cc 100644 --- a/CefSharp.BrowserSubprocess/CefRenderProcess.h +++ b/CefSharp.BrowserSubprocess/CefRenderProcess.h @@ -7,9 +7,8 @@ #include "include/cef_app.h" #include "SubprocessCefApp.h" -int ExecuteCefRenderProcess(HINSTANCE hInstance) +int ExecuteCefRenderProcess(CefMainArgs& main_args) { - CefMainArgs main_args(hInstance); - CefRefPtr subprocessCefAppPtr = SubprocessCefApp::GetInstance(); - return CefExecuteProcess(main_args, (CefRefPtr) subprocessCefAppPtr); + CefRefPtr subprocessCefAppPtr = SubprocessCefApp::GetInstance(); + return CefExecuteProcess(main_args, (CefRefPtr)subprocessCefAppPtr); } diff --git a/CefSharp.BrowserSubprocess/Program.cpp b/CefSharp.BrowserSubprocess/Program.cpp index c0a17e7cb..4e0434258 100644 --- a/CefSharp.BrowserSubprocess/Program.cpp +++ b/CefSharp.BrowserSubprocess/Program.cpp @@ -8,6 +8,8 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { - //CreateJavascriptProxyServiceHost(); - return ExecuteCefRenderProcess(hInstance); + CefMainArgs main_args(hInstance); + + CreateJavascriptProxyServiceHost(); + return ExecuteCefRenderProcess(main_args); }