From 3d2179915d554ef399a456975450f68e0724a612 Mon Sep 17 00:00:00 2001 From: Andreea Pavel Date: Tue, 13 Feb 2018 03:28:44 +0200 Subject: [PATCH] Backed out changeset e68169412c0b (bug 1431404) for failing mochitest browser chrome at browser/base/content/test/general/browser_datachoices_notification.js on a CLOSED TREE --- dom/ipc/TabParent.cpp | 5 +++++ ipc/mscom/Interceptor.cpp | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index f1efd2689e38..95406f98368e 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -973,6 +973,11 @@ TabParent::RecvPDocAccessibleConstructor(PDocAccessibleParent* aDoc, #ifdef XP_WIN a11y::WrapperFor(doc)->SetID(aMsaaID); MOZ_ASSERT(!aDocCOMProxy.IsNull()); +#ifdef NIGHTLY_BUILD + if (aDocCOMProxy.IsNull()) { + return IPC_FAIL(this, "Constructing a top-level PDocAccessible with null COM proxy"); + } +#endif RefPtr proxy(aDocCOMProxy.Get()); doc->SetCOMInterface(proxy); diff --git a/ipc/mscom/Interceptor.cpp b/ipc/mscom/Interceptor.cpp index 52e192705db7..a62a51086ecd 100644 --- a/ipc/mscom/Interceptor.cpp +++ b/ipc/mscom/Interceptor.cpp @@ -28,12 +28,26 @@ #include "nsThreadUtils.h" #include "nsXULAppAPI.h" +#if defined(MOZ_DEV_EDITION) || defined(RELEASE_OR_BETA) + #define ENSURE_HR_SUCCEEDED(hr) \ - MOZ_ASSERT(SUCCEEDED((HRESULT)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__); \ + nsPrintfCString hrAsStr("0x%08X", (HRESULT)hr); \ + CrashReporter::AnnotateCrashReport(location, hrAsStr); \ + MOZ_DIAGNOSTIC_ASSERT(SUCCEEDED((HRESULT)hr)); \ + return hr; \ + } + +#endif // defined(MOZ_DEV_EDITION) || defined(RELEASE_OR_BETA) + namespace mozilla { namespace mscom { namespace detail {