Commit 496b834d authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Fix RenderViewImpl::CloseWindowSoon to handle null render_widget_.

In the future, undead RenderWidgets will no logner exist. This CL updates
RenderViewImpl::CloseWindowSoon to check for this condition.

Bug: 912193
Change-Id: Icbe449794080d36368eac5c9ffe90a198709dbda
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814673
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698502}
parent 60bec769
......@@ -1512,7 +1512,7 @@ void RenderViewImpl::DoDeferredClose() {
void RenderViewImpl::CloseWindowSoon() {
DCHECK(RenderThread::IsMainThread());
if (render_widget_->IsUndeadOrProvisional()) {
if (!render_widget_ || render_widget_->IsUndeadOrProvisional()) {
// Ask the RenderViewHost with a local main frame to initiate close. We
// could be called from deep in Javascript. If we ask the RenderViewHost to
// close now, the window could be closed before the JS finishes executing,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment