Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index 2f7909aa9f906ebdb243e26e6322a4379a535aad..90928316e1f19e40b0d78be20c8997b54c72adbc 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -1067,6 +1067,12 @@ bool RenderFrameHostImpl::CreateRenderFrame(int proxy_routing_id, |
} |
void RenderFrameHostImpl::SetRenderFrameCreated(bool created) { |
+ // We should not create new RenderFrames while our delegate is being destroyed |
+ // (e.g., via a WebContentsObserver during WebContents shutdown). This seems |
+ // to have caused crashes in https://crbug.com/717650. |
+ if (created && delegate_) |
+ CHECK(!delegate_->IsBeingDestroyed()); |
+ |
bool was_created = render_frame_created_; |
render_frame_created_ = created; |