mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix potential OSR crash on renderer process recreation (issue #2082)
This commit is contained in:
@@ -472,7 +472,6 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||||||
weak_ptr_factory_(this) {
|
weak_ptr_factory_(this) {
|
||||||
DCHECK(render_widget_host_);
|
DCHECK(render_widget_host_);
|
||||||
DCHECK(!render_widget_host_->GetView());
|
DCHECK(!render_widget_host_->GetView());
|
||||||
render_widget_host_->SetView(this);
|
|
||||||
|
|
||||||
// CefBrowserHostImpl might not be created at this time for popups.
|
// CefBrowserHostImpl might not be created at this time for popups.
|
||||||
if (content::RenderViewHost::From(render_widget_host_)) {
|
if (content::RenderViewHost::From(render_widget_host_)) {
|
||||||
@@ -503,6 +502,9 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||||||
|
|
||||||
if (browser_impl_.get())
|
if (browser_impl_.get())
|
||||||
ResizeRootLayer();
|
ResizeRootLayer();
|
||||||
|
|
||||||
|
// Do this last because it may result in a call to SetNeedsBeginFrames.
|
||||||
|
render_widget_host_->SetView(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() {
|
CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() {
|
||||||
|
Reference in New Issue
Block a user