summaryrefslogtreecommitdiffstats
path: root/cc/base
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 05:19:17 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 05:19:17 +0000
commitfa9bbe99119e7f216932ec71767d079168e60c7f (patch)
tree3a39498f201e4ee2aaecee2a06402e4bb34f8324 /cc/base
parentf0627eb4b334188da880a1b076514e72a44c78d0 (diff)
downloadchromium_src-fa9bbe99119e7f216932ec71767d079168e60c7f.zip
chromium_src-fa9bbe99119e7f216932ec71767d079168e60c7f.tar.gz
chromium_src-fa9bbe99119e7f216932ec71767d079168e60c7f.tar.bz2
cc: Update invalidation perftest to clean up released tiles.
The tiles are actually being correctly cleaned up at the end of the test, but it seems that it accumulates quite a few of them and times out at the end. This patch ensures that all of the tiles are cleaned up after each invalidate run. R=reveman@chromium.org BUG=298999 Review URL: https://codereview.chromium.org/24487007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/base')
-rw-r--r--cc/base/ref_counted_managed.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/cc/base/ref_counted_managed.h b/cc/base/ref_counted_managed.h
index 7845f32..8bb836f 100644
--- a/cc/base/ref_counted_managed.h
+++ b/cc/base/ref_counted_managed.h
@@ -42,10 +42,12 @@ class CC_EXPORT RefCountedManaged : public base::subtle::RefCountedBase {
void Release() {
if (base::subtle::RefCountedBase::Release()) {
- manager_->Release(static_cast<T*>(this));
-
DCHECK_GT(manager_->live_object_count_, 0);
manager_->live_object_count_--;
+
+ // This must be the last statement in case manager deletes
+ // the object immediately.
+ manager_->Release(static_cast<T*>(this));
}
}