mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1344827: Only disable critical section debug info on beta and release; r=fitzgen
--HG-- extra : amend_source : 764d4a20231a3262bda1dd463d82fc018815ab7b
This commit is contained in:
parent
af86144916
commit
7dba35d193
@ -16,12 +16,18 @@ mozilla::detail::MutexImpl::MutexImpl()
|
||||
{
|
||||
// This number was adopted from NSPR.
|
||||
const static DWORD LockSpinCount = 1500;
|
||||
|
||||
#if defined(RELEASE_OR_BETA)
|
||||
// Vista and later automatically allocate and subsequently leak a debug info
|
||||
// object for each critical section that we allocate unless we tell the
|
||||
// system not to do that.
|
||||
DWORD flags = CRITICAL_SECTION_NO_DEBUG_INFO;
|
||||
#else
|
||||
DWORD flags = 0;
|
||||
#endif // defined(RELEASE_OR_BETA)
|
||||
|
||||
BOOL r = InitializeCriticalSectionEx(&platformData()->criticalSection,
|
||||
LockSpinCount,
|
||||
CRITICAL_SECTION_NO_DEBUG_INFO);
|
||||
LockSpinCount, flags);
|
||||
MOZ_RELEASE_ASSERT(r);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user