mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1203553 - Fix an MSVC warning in mozglue. r=glandium.
This lets us remove the ALLOW_COMPILER_WARNINGS=True flag.
This commit is contained in:
parent
b0fdb0c663
commit
207940a6b1
@ -437,12 +437,16 @@ DllBlockSet::Add(const char* name, unsigned long long version)
|
||||
void
|
||||
DllBlockSet::Write(HANDLE file)
|
||||
{
|
||||
AutoCriticalSection lock(&sLock);
|
||||
DWORD nBytes;
|
||||
// It would be nicer to use AutoCriticalSection here. However, its destructor
|
||||
// might not run if an exception occurs, in which case we would never leave
|
||||
// the critical section. (MSVC warns about this possibility.) So we
|
||||
// enter and leave manually.
|
||||
::EnterCriticalSection(&sLock);
|
||||
|
||||
// Because this method is called after a crash occurs, and uses heap memory,
|
||||
// protect this entire block with a structured exception handler.
|
||||
MOZ_SEH_TRY {
|
||||
DWORD nBytes;
|
||||
for (DllBlockSet* b = gFirst; b; b = b->mNext) {
|
||||
// write name[,v.v.v.v];
|
||||
WriteFile(file, b->mName, strlen(b->mName), &nBytes, nullptr);
|
||||
@ -466,6 +470,8 @@ DllBlockSet::Write(HANDLE file)
|
||||
}
|
||||
}
|
||||
MOZ_SEH_EXCEPT (EXCEPTION_EXECUTE_HANDLER) { }
|
||||
|
||||
::LeaveCriticalSection(&sLock);
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -94,9 +94,6 @@ DEFINES['IMPL_MFBT'] = True
|
||||
|
||||
LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
|
||||
|
||||
if CONFIG['_MSC_VER']:
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Darwin':
|
||||
# On OSX 10.10.3, a dead lock happens in some cases involving dynamic
|
||||
# symbol resolution for symbols that jemalloc itself uses. While it
|
||||
|
Loading…
Reference in New Issue
Block a user