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

Unified Diff: src/ports/SkMutex_pthread.h

Issue 338973006: In Debug, SkMutex(pthread) crashes on re-entrant aquire from same thread. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/ports/SkMutex_pthread.h
diff --git a/src/ports/SkMutex_pthread.h b/src/ports/SkMutex_pthread.h
index 1904140c4cc651f2c7b5bf3191a7c97e81f8591d..662e549f12e65dd29cc6cd2b632327e8a026afea 100644
--- a/src/ports/SkMutex_pthread.h
+++ b/src/ports/SkMutex_pthread.h
@@ -19,6 +19,7 @@
// a corresponding static finalizer).
struct SkBaseMutex {
void acquire() {
+ SkASSERT(fOwner != pthread_self()); // SkMutex is not re-entrant
mtklein 2014/06/20 15:34:31 Run this through the TSAN bot before submitting?
pthread_mutex_lock(&fMutex);
SkDEBUGCODE(fOwner = pthread_self();)
}
« 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