From 7c2d0327b7219e500586c680329db6afd5dfd08d Mon Sep 17 00:00:00 2001 From: Zoltan Arvai Date: Mon, 13 Jan 2014 15:21:17 +0100 Subject: Fix WebEngineContext on Windows AppendSwitchASCII won't accept WChars, it would need WideToASCII conversion. But on OS_WIN AppendSwitchASCII method only wraps parameters for AppendSwitchNative with ASCIIToWide. Doing ASCIIToWide(WideToASCII()) not seems to be a useful idea, so we should call directly AppendSwitchNative on Windows. See chromium/base/command_line.cc. Change-Id: I9733993840ddaef2dbb3176135977c39a967e381 Reviewed-by: Andras Becsi --- src/core/web_engine_context.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/web_engine_context.cpp') diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index adc7e7dac..28d336e9d 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -131,7 +131,11 @@ WebEngineContext::WebEngineContext(WebContentsAdapterClient::RenderingMode rende CommandLine* parsedCommandLine = CommandLine::ForCurrentProcess(); parsedCommandLine->AppendSwitchASCII(switches::kUserAgent, webkit_glue::BuildUserAgentFromProduct("QtWebEngine/0.1")); +#if defined(OS_WIN) + parsedCommandLine->AppendSwitchNative(switches::kBrowserSubprocessPath,WebEngineLibraryInfo::subProcessPath().value().c_str()); +#else parsedCommandLine->AppendSwitchASCII(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::subProcessPath().value().c_str()); +#endif parsedCommandLine->AppendSwitch(switches::kNoSandbox); parsedCommandLine->AppendSwitch(switches::kDisablePlugins); -- cgit v1.2.3