diff options
author | halcanary <halcanary@google.com> | 2014-06-11 09:40:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-06-11 09:40:23 -0700 |
commit | 9b7906672eb6794497d560761aa8bab824a13a90 (patch) | |
tree | 422a48ae6a9402fb6ebfca6296495d2603bbd057 /src/lazy/SkDiscardableMemoryPool.cpp | |
parent | 1c99ea8ed80ca492397717b57e2735869be38c69 (diff) |
Use new SkBaseMutex::assertHeld() in DiscardableMemoryPool
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/324413003
Diffstat (limited to 'src/lazy/SkDiscardableMemoryPool.cpp')
-rw-r--r-- | src/lazy/SkDiscardableMemoryPool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp index 1d63a0bad7..db2754e473 100644 --- a/src/lazy/SkDiscardableMemoryPool.cpp +++ b/src/lazy/SkDiscardableMemoryPool.cpp @@ -145,9 +145,9 @@ DiscardableMemoryPool::~DiscardableMemoryPool() { } void DiscardableMemoryPool::dumpDownTo(size_t budget) { - // assert((NULL = fMutex) || fMutex->isLocked()); - // TODO(halcanary) implement bool fMutex::isLocked(). - // WARNING: only call this function after aquiring lock. + if (fMutex != NULL) { + fMutex->assertHeld(); + } if (fUsed <= budget) { return; } |