Skip to content

Commit 926cd72

Browse files
committed
BrowserSubProcess.Core.BrowserSubprocessExecutable - Return -1 when no type param specified as per the doc
1 parent 94e3118 commit 926cd72

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CefSharp.BrowserSubprocess.Core/BrowserSubprocessExecutable.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ namespace CefSharp
6767
{
6868
auto type = CommandLineArgsParser::GetArgumentValue(args, CefSharpArguments::SubProcessTypeArgument);
6969

70+
if (String::IsNullOrEmpty(type))
71+
{
72+
//If --type param missing from command line CEF/Chromium assums
73+
//this is the main process (as all subprocesses must have a type param).
74+
//Return -1 to indicate this behaviour.
75+
return -1;
76+
}
77+
7078
auto parentProcessId = -1;
7179

7280
// The Crashpad Handler doesn't have any HostProcessIdArgument, so we must not try to

0 commit comments

Comments
 (0)