mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Merge pull request #1632 from vasiliy-vdovichenko/master
Fixed Wpf ObjectDisposedException when quickly disposing ChromiumWebBrowser
This commit is contained in:
@@ -243,7 +243,10 @@ void CefBrowserHostWrapper::SendKeyEvent(int message, int wParam, int lParam)
|
||||
|
||||
double CefBrowserHostWrapper::GetZoomLevelOnUI()
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (_disposed)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
CefTaskScheduler::EnsureOn(TID_UI, "CefBrowserHostWrapper::GetZoomLevel");
|
||||
|
||||
|
||||
@@ -582,7 +582,7 @@ namespace CefSharp.Wpf
|
||||
var task = this.GetZoomLevelAsync();
|
||||
task.ContinueWith(previous =>
|
||||
{
|
||||
if (previous.IsCompleted)
|
||||
if (previous.Status == TaskStatus.RanToCompletion)
|
||||
{
|
||||
UiThreadRunAsync(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user