mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Bug 1533918 - Disallow CrossProcessMutex when sandboxing is enabled. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D50941 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
7efef281eb
commit
00aa39e853
@ -38,6 +38,11 @@ static void InitMutex(pthread_mutex_t* mMutex) {
|
||||
|
||||
CrossProcessMutex::CrossProcessMutex(const char*)
|
||||
: mMutex(nullptr), mCount(nullptr) {
|
||||
#if defined(MOZ_SANDBOX)
|
||||
// POSIX mutexes in shared memory aren't guaranteed to be safe - and
|
||||
// they specifically are not on Linux.
|
||||
MOZ_RELEASE_ASSERT(false);
|
||||
#endif
|
||||
mSharedBuffer = new ipc::SharedMemoryBasic;
|
||||
if (!mSharedBuffer->Create(sizeof(MutexData))) {
|
||||
MOZ_CRASH();
|
||||
|
Loading…
x
Reference in New Issue
Block a user