Bug 1504022 - Restore mingw overrides for __try/__except (backout of 1498676) r=bobowen

mingw-clang, when using SEH exceptions, compile these fine but don't unwind
them properly. When using sj/lj exceptions it can't compile them at all.

--HG--
extra : histedit_source : 07b5beb9d09d0b1841d7a8a74007333be1ac810a
This commit is contained in:
Tom Ritter 2018-11-02 13:07:29 -05:00
parent 295da82633
commit 51fc86e3a0

View File

@ -45,6 +45,17 @@
*/
#if defined(CHROMIUM_SANDBOX_BUILD) && defined(XP_WIN)
#include "base/win/sdkdecls.h"
#ifdef __MINGW32__
/*
* MinGW doesn't support __try / __except. There are a few mechanisms available
* to hack around it and pseudo-support it, but these are untested in Firefox.
* What is tested (and works) is replacing them with if(true) and else.
*/
#define __try if(true)
#define __except(x) else
#endif /* __MINGW32__ */
#endif /* defined(CHROMIUM_SANDBOX_BUILD) && defined(XP_WIN) */
#endif /* MOZILLA_CONFIG_H */