Commit Graph

4 Commits

Author SHA1 Message Date
Alex Maitland 15cb6d4754 Core - BrowserRefCount add some basic logging
Logs some basic information so we can see what type of ChromiumWebBrowser hasn't been closed
within as part of the xUnit tests.

* Meant for internal use and might be subject to change.
2022-05-31 15:43:34 +10:00
amaitland 6b440a84a3 Shutdown - Improve WaitForBrowsersToClose
- Add Cef.PreShutdown
- For WPF hook the DispatcherShutdownStarted and DispatcherShutdownFinished events then call Cef.PreShutdown
- Add NoOpBrowserRefCounter and set as default, needs a little more testing before it's enabled by default.
  Can be enabled by calling Cef.EnableWaitForBrowsersToClose before calling Cef.Initialize

Issue #3047
2020-05-03 21:58:05 +10:00
amaitland 30f2204f8e Xml Doc Improvements 2020-02-29 13:16:23 +10:00
amaitland 7100c3d0ec Core - Add Cef.WaitForBrowsersToClose helper function
- Add BrowserRefCounter to increment/decrement CefBrowser instance creation
- Add Cef.WaitForBrowsersToClose to dispose of all browser instances and call WaitForBrowsersToClose

Before calling CefShutdown it's important that CEF has finished closing/disposing of all the CefBrowser instances.
If you call CefShutdown before this has finished then you can get the error
"Check failed: !IsCefShutdown(). Object reference incorrectly held at CefShutdown".
This is more a problem when using MultiThreadedMessageLoop where CEF close/dispose happens on a different thread.
Calling ChromiumWebBrowser.Dispose will start to free the resources, CEF internally executes code on it's own thread.

#3047
2020-02-14 19:39:12 +10:00