Fix TextureLayer cleanup
commit2f52981931ea3f5a34c2e88ec5dc83e85c58d215
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 12 Jul 2013 01:58:39 +0000 (12 01:58 +0000)
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 12 Jul 2013 01:58:39 +0000 (12 01:58 +0000)
treedec2d69a08b0dea97f94d2282d1ee149efaaee17
parent4368aed0262f03598c6a7522b46f955dc9ee989d
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
cc/layers/layer.cc
cc/layers/layer_unittest.cc
cc/layers/texture_layer.cc
cc/layers/texture_layer_unittest.cc
cc/trees/layer_tree_host.h