Index: cc/thread_proxy.cc |
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc |
index 666c03f7ca5072eb76d75d7eb41d71e46a91a612..418b1c75c0a9b490fa0380c33499d2a6b9c366bf 100644 |
--- a/cc/thread_proxy.cc |
+++ b/cc/thread_proxy.cc |
@@ -371,11 +371,17 @@ bool ThreadProxy::reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int |
void ThreadProxy::sendManagedMemoryStats() |
{ |
DCHECK(isImplThread()); |
- if (m_layerTreeHostImpl.get() && m_layerTreeHostImpl->renderer()) |
- m_layerTreeHostImpl->renderer()->sendManagedMemoryStats( |
- m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(), |
- m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes(), |
- m_layerTreeHost->contentsTextureManager()->memoryUseBytes()); |
+ if (!m_layerTreeHostImpl.get()) |
+ return; |
+ if (!m_layerTreeHostImpl->renderer()) |
+ return; |
+ if (!m_layerTreeHost->contentsTextureManager()) |
+ return; |
+ |
+ m_layerTreeHostImpl->renderer()->sendManagedMemoryStats( |
+ m_layerTreeHost->contentsTextureManager()->memoryVisibleBytes(), |
+ m_layerTreeHost->contentsTextureManager()->memoryVisibleAndNearbyBytes(), |
+ m_layerTreeHost->contentsTextureManager()->memoryUseBytes()); |
} |
void ThreadProxy::setNeedsRedraw() |