summaryrefslogtreecommitdiffstats
path: root/cc/layers/layer.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-12 01:58:39 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-12 01:58:39 +0000
commit2f52981931ea3f5a34c2e88ec5dc83e85c58d215 (patch)
treedec2d69a08b0dea97f94d2282d1ee149efaaee17 /cc/layers/layer.cc
parent4368aed0262f03598c6a7522b46f955dc9ee989d (diff)
downloadchromium_src-2f52981931ea3f5a34c2e88ec5dc83e85c58d215.zip
chromium_src-2f52981931ea3f5a34c2e88ec5dc83e85c58d215.tar.gz
chromium_src-2f52981931ea3f5a34c2e88ec5dc83e85c58d215.tar.bz2
Fix TextureLayer cleanup
In ~TextureLayer, we should have been removed from the tree, so it's too late to do cleanup. It actually means we were never calling StopRateLimiter when removed from the tree, which had the potential to leak RateLimiters, or even have them call into a deleted context. Instead, move the cleanup to when we're removed from the tree, and when we clear the client. BUG=None R=danakj@chromium.org Review URL: https://codereview.chromium.org/19039002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211292 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/layer.cc')
-rw-r--r--cc/layers/layer.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 7fe86ac..9cb4708 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -68,6 +68,9 @@ Layer::~Layer() {
// Our parent should be holding a reference to us so there should be no
// way for us to be destroyed while we still have a parent.
DCHECK(!parent());
+ // Similarly we shouldn't have a layer tree host since it also keeps a
+ // reference to us.
+ DCHECK(!layer_tree_host());
layer_animation_controller_->RemoveValueObserver(this);