Fix potential OSR crash on renderer process recreation (issue #2082)
This commit is contained in:
parent
4bafa3e155
commit
6d7f90ec51
|
@ -472,7 +472,6 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||
weak_ptr_factory_(this) {
|
||||
DCHECK(render_widget_host_);
|
||||
DCHECK(!render_widget_host_->GetView());
|
||||
render_widget_host_->SetView(this);
|
||||
|
||||
// CefBrowserHostImpl might not be created at this time for popups.
|
||||
if (content::RenderViewHost::From(render_widget_host_)) {
|
||||
|
@ -503,6 +502,9 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||
|
||||
if (browser_impl_.get())
|
||||
ResizeRootLayer();
|
||||
|
||||
// Do this last because it may result in a call to SetNeedsBeginFrames.
|
||||
render_widget_host_->SetView(this);
|
||||
}
|
||||
|
||||
CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() {
|
||||
|
|
Loading…
Reference in New Issue