Set visibility state correctly after OSR renderer process crashes and avoid DCHECKs (issue #1779)

This commit is contained in:
Marshall Greenblatt 2015-12-03 14:48:26 -05:00
parent 6824387c8d
commit 903e296621
2 changed files with 5 additions and 1 deletions

View File

@ -457,6 +457,10 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
new extensions::ExtensionsGuestViewMessageFilter(id, browser_context)); new extensions::ExtensionsGuestViewMessageFilter(id, browser_context));
} }
// If the renderer process crashes then the host may already have
// CefBrowserInfoManager as an observer. Try to remove it first before adding
// to avoid DCHECKs.
host->RemoveObserver(CefBrowserInfoManager::GetInstance());
host->AddObserver(CefBrowserInfoManager::GetInstance()); host->AddObserver(CefBrowserInfoManager::GetInstance());
host->Send(new CefProcessMsg_SetIsIncognitoProcess( host->Send(new CefProcessMsg_SetIsIncognitoProcess(

View File

@ -451,7 +451,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
parent_host_view_(parent_host_view), parent_host_view_(parent_host_view),
popup_host_view_(NULL), popup_host_view_(NULL),
child_host_view_(NULL), child_host_view_(NULL),
is_showing_(true), is_showing_(!render_widget_host_->is_hidden()),
is_destroyed_(false), is_destroyed_(false),
is_scroll_offset_changed_pending_(false), is_scroll_offset_changed_pending_(false),
#if defined(OS_MACOSX) #if defined(OS_MACOSX)