Index: src/lazy/SkDiscardableMemoryPool.cpp |
diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp |
index 1d63a0bad710985b7dc2ab127554e77906075753..341a79dfad130e4d65c7c1d84b4335b190f68210 100644 |
--- a/src/lazy/SkDiscardableMemoryPool.cpp |
+++ b/src/lazy/SkDiscardableMemoryPool.cpp |
@@ -145,9 +145,11 @@ 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. |
+ #ifdef SK_DEBUG |
mtklein
2014/06/11 15:59:04
Doesn't really need the SK_DEBUG check?
hal.canary
2014/06/11 16:17:32
Yes, because in release, you could call NULL->asse
|
+ if (fMutex != NULL) { |
+ fMutex->assertHeld(); |
+ } |
+ #endif // SK_DEBUG |
if (fUsed <= budget) { |
return; |
} |