Bug 1514592: Don't call RpcExceptionCode if we don't HAVE_SEH_EXCEPTIONS. r=aklotz
authorDavid Major <dmajor@mozilla.com>
Mon, 07 Jan 2019 17:58:45 -0500
changeset 509942 0d14ab4c9b5b31c4466252774a68539320f46f52
parent 509941 b153c2a6f40af821f291c0b84bb5ae4a29c00967
child 509943 9ee71cbdb6ab65bd05c2c33edded8b5fa9faebde
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz
bugs1514592
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1514592: Don't call RpcExceptionCode if we don't HAVE_SEH_EXCEPTIONS. r=aklotz
ipc/mscom/StructStream.h
--- a/ipc/mscom/StructStream.h
+++ b/ipc/mscom/StructStream.h
@@ -47,20 +47,22 @@ class MOZ_NON_TEMPORARY_CLASS StructToSt
         mEncodedLen(0) {
     mStatus =
         ::MesEncodeDynBufferHandleCreate(&mBuffer, &mEncodedLen, &mHandle);
     if (mStatus != RPC_S_OK) {
       return;
     }
 
     MOZ_SEH_TRY { aEncodeFnPtr(mHandle, &aSrcStruct); }
+#ifdef HAVE_SEH_EXCEPTIONS
     MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
       mStatus = ::RpcExceptionCode();
       return;
     }
+#endif
 
     if (!mBuffer || !mEncodedLen) {
       mStatus = RPC_X_NO_MEMORY;
       return;
     }
   }
 
   ~StructToStream() {
@@ -205,20 +207,22 @@ class MOZ_NON_TEMPORARY_CLASS StructFrom
       return false;
     }
 
     // NB: Deserialization will fail with BSTRs unless the destination data
     //     is zeroed out!
     ZeroMemory(aDestStruct, sizeof(StructT));
 
     MOZ_SEH_TRY { aDecodeFnPtr(mHandle, aDestStruct); }
+#ifdef HAVE_SEH_EXCEPTIONS
     MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
       mStatus = ::RpcExceptionCode();
       return false;
     }
+#endif
 
     return true;
   }
 
   StructFromStream(const StructFromStream&) = delete;
   StructFromStream(StructFromStream&&) = delete;
   StructFromStream& operator=(const StructFromStream&) = delete;
   StructFromStream& operator=(StructFromStream&&) = delete;