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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 453523002: Fix shutdown assertions in WebViewImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 9f8c31ff244cd5c6fcd84ac10f547d188cc6ce3f..f55a4168b18f850fe190a364cbb30425e3aeccb4 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -3991,6 +3991,12 @@ void WebViewImpl::initializeLayerTreeView()
void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
{
+ // In the middle of shutting down; don't try to spin back up a compositor.
+ // FIXME: compositing startup/shutdown should be refactored so that it
+ // turns on explicitly rather than lazily, which causes this awkwardness.
+ if (m_layerTreeViewClosed)
+ return;
+
ASSERT(!active || m_layerTreeView);
blink::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
@@ -4000,10 +4006,6 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (!m_client)
return;
- // In the middle of shutting down; don't try to spin back up a compositor.
- if (m_layerTreeViewClosed)
- return;
-
if (!active) {
m_isAcceleratedCompositingActive = false;
if (!m_layerTreeViewCommitsDeferred) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698