Commit a0549215 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Revert "Make sure to unblock a WebContents during a mass dialog closure."

This reverts commit f7e423bf.

Reason for revert:

This was a speculative fix, thinking that perhaps WillClose() wasn't getting called. But it is, and all the correct calls are being made (see https://bugs.chromium.org/p/chromium/issues/detail?id=880210#c16) so this code only complicates things.

Original change's description:
> Make sure to unblock a WebContents during a mass dialog closure.
> 
> BUG=880210
> 
> Change-Id: I44e80bc0866fef5370936db3f2cb4d3eacf620f2
> Reviewed-on: https://chromium-review.googlesource.com/1241094
> Reviewed-by: Leonard Grey <lgrey@chromium.org>
> Reviewed-by: Mike Wittman <wittman@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#594135}

TBR=avi@chromium.org,wittman@chromium.org,lgrey@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 880210
Change-Id: Ibbd669649add66e0bc4052eb6b04c845ffb40f38
Reviewed-on: https://chromium-review.googlesource.com/1249389Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595166}
parent acc15375
......@@ -106,10 +106,6 @@ WebContentsModalDialogManager::DialogState::~DialogState() = default;
// then set the block state. Advantage: could restrict some of the
// WCMDM delegate methods, then, and pass them behind the scenes.
void WebContentsModalDialogManager::BlockWebContentsInteraction(bool blocked) {
if (blocked == web_contents_is_blocked_)
return;
web_contents_is_blocked_ = blocked;
WebContents* contents = web_contents();
if (!contents) {
// The WebContents has already disconnected.
......@@ -128,7 +124,6 @@ void WebContentsModalDialogManager::CloseAllDialogs() {
while (!child_dialogs_.empty()) {
child_dialogs_.front().manager->Close();
}
BlockWebContentsInteraction(false);
closing_all_dialogs_ = false;
}
......
......@@ -109,9 +109,6 @@ class WebContentsModalDialogManager
// True while closing the dialogs on WebContents close.
bool closing_all_dialogs_;
// True if the WebContents is blocked.
bool web_contents_is_blocked_ = false;
DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManager);
};
......
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