In Debug, SkMutex(pthread) crashes on re-entrant aquire from same thread.

R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/338973006
This commit is contained in:
halcanary 2014-06-20 09:05:56 -07:00 committed by Commit bot
parent 912d809a85
commit e486ec48b1

View File

@ -19,6 +19,7 @@
// a corresponding static finalizer).
struct SkBaseMutex {
void acquire() {
SkASSERT(fOwner != pthread_self()); // SkMutex is not re-entrant
pthread_mutex_lock(&fMutex);
SkDEBUGCODE(fOwner = pthread_self();)
}