Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Unified Diff: src/lazy/SkDiscardableMemoryPool.cpp

Issue 324413003: Use new SkBaseMutex::assertHeld() in DiscardableMemoryPool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698