| Index: base/synchronization/lock_impl_posix.cc
|
| diff --git a/base/synchronization/lock_impl_posix.cc b/base/synchronization/lock_impl_posix.cc
|
| index 5619adaf5d829df72f93fd57b0687d551fb9390d..1eca32c67777d689057efe1b5012f8bfe38878ec 100644
|
| --- a/base/synchronization/lock_impl_posix.cc
|
| +++ b/base/synchronization/lock_impl_posix.cc
|
| @@ -13,21 +13,22 @@ namespace base {
|
| namespace internal {
|
|
|
| LockImpl::LockImpl() {
|
| -#ifndef NDEBUG
|
| - // In debug, setup attributes for lock error checking.
|
| pthread_mutexattr_t mta;
|
| int rv = pthread_mutexattr_init(&mta);
|
| DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
| +#if !defined(OS_NACL)
|
| + rv = pthread_mutexattr_setprotocol(&mta, PTHREAD_PRIO_INHERIT);
|
| + DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
| +#endif
|
| +#ifndef NDEBUG
|
| + // In debug, setup attributes for lock error checking.
|
| rv = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK);
|
| DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
| +#endif
|
| rv = pthread_mutex_init(&native_handle_, &mta);
|
| DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
| rv = pthread_mutexattr_destroy(&mta);
|
| DCHECK_EQ(rv, 0) << ". " << strerror(rv);
|
| -#else
|
| - // In release, go with the default lock attributes.
|
| - pthread_mutex_init(&native_handle_, NULL);
|
| -#endif
|
| }
|
|
|
| LockImpl::~LockImpl() {
|
|
|