Fix showModalDialog not closing with window.close
Now that the logic for output surface (re)creation has been moved up to
RenderWidgetCompositor rather than being buried in cc,
https://codereview.chromium.org/513433002/ can be reverted and output
surface creation can just be blocked directly.
Previously, there was a race between the compositor posting messages to
creating output surfaces and the RenderWidget close message. This was
fixed by destroying the compositor (and its weak pointer) so that create
output surface was aborted. Because the compositor was destroyed,
DoDeferredClose needed to be non-nestable, for reasons given in the
above description.
Instead, use the host closing boolean to abort create output surface
messages, and preserve the compositor until the actual close. This lets
DoDeferredClose be handled by the modal dialog nested message loop and
lets window.close run for showModalDialog for the brief period while it
still exists.
BUG=436514
Review URL: https://codereview.chromium.org/790883002
Cr-Commit-Position: refs/heads/master@{#307559}
3 files changed