Hi, All,

I've noticed that webkit is using ASSERT(!mutex.tryLock()) in many
places asserting the mutex is already locked. However this introduces
a hidden assumption that WebKit Mutex is not recursive. I haven't
found any other place that depends on this assumption. Have anyone
seen one? If this assumption is only used in assertions, I think it
would probably be better to use a boolean flag in #ifndef NDEBUG and
ASSERT(mutex.isLocked()), so we can remove this unnecessary
assumption. Otherwise, we should make it clear that WebKit Mutex must
be non-recursive. I've opened a bug for ThreadingPthread to explicitly
use PTHREAD_MUTEX_NORMAL:
https://bugs.webkit.org/show_bug.cgi?id=39893

Best regards,

Yong Li
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to