Bug 1033457 - Use HAVE_SEH_EXCEPTIONS in order to use SEH exceptions in libjar; r=bsmedberg
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 02 Jul 2014 14:34:58 -0400
changeset 192014 d6e4fac2b9a1960cfd46b33c91ef476ac43962db
parent 192013 f1be89cb58b92f458c14f5fe5b3670d56cb6ea6e
child 192015 c93e297aaaf1c93936e13a0bc43455199bd93b83
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbsmedberg
bugs1033457
milestone33.0a1
Bug 1033457 - Use HAVE_SEH_EXCEPTIONS in order to use SEH exceptions in libjar; r=bsmedberg
modules/libjar/nsZipArchive.h
--- a/modules/libjar/nsZipArchive.h
+++ b/modules/libjar/nsZipArchive.h
@@ -15,17 +15,17 @@
 #include "zlib.h"
 #include "zipstruct.h"
 #include "nsAutoPtr.h"
 #include "nsIFile.h"
 #include "nsISupportsImpl.h" // For mozilla::ThreadSafeAutoRefCnt
 #include "mozilla/FileUtils.h"
 #include "mozilla/FileLocation.h"
 
-#if defined(XP_WIN) && defined(_MSC_VER)
+#ifdef HAVE_SEH_EXCEPTIONS
 #define MOZ_WIN_MEM_TRY_BEGIN __try {
 #define MOZ_WIN_MEM_TRY_CATCH(cmd) }                                \
   __except(GetExceptionCode()==EXCEPTION_IN_PAGE_ERROR ?            \
            EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)   \
   {                                                                 \
     NS_WARNING("EXCEPTION_IN_PAGE_ERROR in " __FUNCTION__);         \
     cmd;                                                            \
   }