Index: src/lazy/SkDiscardableMemoryPool.cpp |
diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp |
index 1d63a0bad710985b7dc2ab127554e77906075753..db2754e473ae37a736ac23a6a5d2957be10e8238 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; |
} |