I am upgrading my application from CefSharp 53 to the current CefSharp 73. (I know, super behind). I specifically use the CefSharp.OffScreen.ChromiumWebBrowser and one thing I noticed is there are now two CefSharp.BrowserSubprocess.exe processes that start (on Windows 10, x64). When dispose is called, one of the two processes closes leaving the other open.
Is this expected? With version 53 it just fired up one process and closed it upon calling dispose. If it helps I am using cefsharp to create a screenshot, so after the page loads, I call ScreenShotOrNull().
Edit: Some code context:
I am starting cefsharp at windows service start:
static void Main(string[] args)
{
var settings = var settings = new CefSettings
{
LogSeverity = LogSeverity.Warning
};
settings.CefCommandLineArgs.Add("disable-gpu", "1");
settings.CefCommandLineArgs.Add("disable-gpu-vsync", "1");
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
Cef.Initialize(settings);
}
At this point no browser is being instantiated and thus, no processes. However, when needed I will call:
using (_browser = new ChromiumWebBrowser(url) { Size = new
Size(width, 720) })
{
// At this point, there are two processes
// Code waiting for browser to finish loading
using(var bitmap = _browser.ScreenshotOrNull())
{
// Code for saving
}
}
After it finishes, there is only one process, with the following command line parameters:
--type=gpu-process --field-trial-handle=2968,16124456567459120137,1231289933363561479,131072 --disable-features=VizDisplayCompositor --no-sandbox --disable-gpu-vsync=1 --log-file="log.txt" --log-severity=warning --lang=en-US --cefsharpexitsub --gpu-preferences=AGiantStringThatWontDisplayHereCorrectly --use-gl=swiftshader-webgl --log-file="debug.log" --service-request-channel-token=13307567583052100413 --mojo-platform-channel-handle=3016 /prefetch:2 --host-process-id=7444 10428