Always pass through Process Id to subprocess

Improve command line parsing

Partial import of changes from #2375
This commit is contained in:
amaitland
2018-04-30 12:45:15 +10:00
parent 801d53b3cf
commit a8ff890433
6 changed files with 23 additions and 28 deletions
@@ -14,19 +14,20 @@ namespace CefSharp
{
void WcfEnabledSubProcess::OnBrowserCreated(CefBrowserWrapper^ browser)
{
if (!parentBrowserId.HasValue)
if (!_parentBrowserId.HasValue)
{
parentBrowserId = browser->BrowserId;
_parentBrowserId = browser->BrowserId;
}
if (!parentProcessId.HasValue || !parentBrowserId.HasValue)
if (!_parentBrowserId.HasValue)
{
return;
}
auto browserId = browser->IsPopup ? parentBrowserId.Value : browser->BrowserId;
//TODO: This can likely be simplified as both values are likely equal
auto browserId = browser->IsPopup ? _parentBrowserId.Value : browser->BrowserId;
auto serviceName = RenderprocessClientFactory::GetServiceName(parentProcessId.Value, browserId);
auto serviceName = RenderprocessClientFactory::GetServiceName(_parentProcessId, browserId);
auto binding = BrowserProcessServiceHost::CreateBinding();