Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Issue 504373002: Don't destroy RenderWidgetCompositor during DoDeferredClose (Closed)

Created:
6 years, 3 months ago by enne (OOO)
Modified:
6 years, 3 months ago
Reviewers:
danakj, jamesr
CC:
cc-bugs_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Don't destroy RenderWidgetCompositor during DoDeferredClose Destroying RenderWidgetCompositor during RenderWidget::DoDeferredClose can cause problems for nested message loops. The bug is that InputHandlerProxy creates a SwapPromiseMonitor which adds itself to the LayerTreeHost. In that stack, a nested message loop is run which runs the RenderWidget::DoDeferredClose function which previously destroyed the LayerTreeHost. This explodes, because LayerTreeHost expects all SwapPromiseMonitors to be removed before it is destroyed. The reason for DoDeferredClose to destroy the LayerTreeHost is so that CreateOutputSurface messages (which are posted if creating an output surface fails) get handled when the gpu channel has already gone away during shutdown. Destroying it invalidated these messages. This alternate fix preserves the lifetime of the LayerTreeHost, but adds a new SetLayerTreeHostClientFinished call to abort any CreateOutputSurface calls which may be handled during shutdown. This extra plumbing fixes both problems. R=jamesr@chromium.org,danakj@chromium.org BUG=403500

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -17 lines) Patch
M cc/test/fake_proxy.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 chunk +4 lines, -0 lines 1 comment Download
M cc/trees/layer_tree_host_unittest_context.cc View 1 chunk +71 lines, -0 lines 0 comments Download
M cc/trees/proxy.h View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 3 chunks +12 lines, -0 lines 0 comments Download
M cc/trees/thread_proxy.h View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/thread_proxy.cc View 3 chunks +10 lines, -1 line 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/render_widget.cc View 4 chunks +11 lines, -13 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
enne (OOO)
6 years, 3 months ago (2014-08-26 20:51:06 UTC) #1
danakj
https://codereview.chromium.org/504373002/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/504373002/diff/1/cc/trees/layer_tree_host.cc#newcode164 cc/trees/layer_tree_host.cc:164: CHECK(swap_promise_monitor_.empty()); Can you change this to a DCHECK now?
6 years, 3 months ago (2014-08-26 20:52:31 UTC) #2
enne (OOO)
Alternate patch: https://codereview.chromium.org/513433002
6 years, 3 months ago (2014-08-26 21:41:23 UTC) #3
enne (OOO)
6 years, 3 months ago (2014-09-02 17:10:52 UTC) #4
Closing this as alternate patch landed.

Powered by Google App Engine
This is Rietveld 408576698