From 3263c3ac00c5be6453990e4eb6761e2ea38b32a2 Mon Sep 17 00:00:00 2001 From: Aaron Klotz Date: Wed, 29 Nov 2017 14:50:17 -0700 Subject: [PATCH] Bug 1414421: Change some diagnostic asserts in mscom to stop firing on dev edition; r=Jamie MozReview-Commit-ID: JfKevpNIiRT --HG-- extra : rebase_source : 07b6ccd13b5ee589290b7b9e8069f9db5ceaf132 --- ipc/mscom/Interceptor.cpp | 11 +++++++++++ ipc/mscom/ProxyStream.cpp | 2 ++ 2 files changed, 13 insertions(+) diff --git a/ipc/mscom/Interceptor.cpp b/ipc/mscom/Interceptor.cpp index 4c398aa8d787..6ac01169c285 100644 --- a/ipc/mscom/Interceptor.cpp +++ b/ipc/mscom/Interceptor.cpp @@ -28,6 +28,15 @@ #include "nsThreadUtils.h" #include "nsXULAppAPI.h" +#if defined(MOZ_DEV_EDITION) || defined(RELEASE_OR_BETA) + +#define ENSURE_HR_SUCCEEDED(hr) \ + if (FAILED((HRESULT)hr)) { \ + return hr; \ + } + +#else + #define ENSURE_HR_SUCCEEDED(hr) \ if (FAILED((HRESULT)hr)) { \ nsPrintfCString location("ENSURE_HR_SUCCEEDED \"%s\": %u", __FILE__, __LINE__); \ @@ -37,6 +46,8 @@ return hr; \ } +#endif // defined(MOZ_DEV_EDITION) || defined(RELEASE_OR_BETA) + namespace mozilla { namespace mscom { namespace detail { diff --git a/ipc/mscom/ProxyStream.cpp b/ipc/mscom/ProxyStream.cpp index a74043c124be..d69158c5af33 100644 --- a/ipc/mscom/ProxyStream.cpp +++ b/ipc/mscom/ProxyStream.cpp @@ -331,7 +331,9 @@ ProxyStream::ProxyStream(REFIID aIID, IUnknown* aObject, Environment* aEnv, marshalResult = ::CoMarshalInterface(stream, aIID, aObject, MSHCTX_LOCAL, nullptr, mshlFlags); +#if !defined(MOZ_DEV_EDITION) MOZ_DIAGNOSTIC_ASSERT(marshalResult != E_INVALIDARG); +#endif // !defined(MOZ_DEV_EDITION) if (FAILED(marshalResult)) { return; }