Skip to content

Commit 1d100df

Browse files
committed
Bug 1493448: Print out the failing HRESULT when assertion fires in mscom::AgileReference::Clear; r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D26001 --HG-- extra : moz-landing-system : lando
1 parent d1e02bf commit 1d100df

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ipc/mscom/AgileReference.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
#include "mozilla/Move.h"
1313
#include "mozilla/mscom/Utils.h"
1414

15+
#if defined(MOZILLA_INTERNAL_API)
16+
#include "nsDebug.h"
17+
#include "nsPrintfCString.h"
18+
#endif // defined(MOZILLA_INTERNAL_API)
19+
1520
#if NTDDI_VERSION < NTDDI_WINBLUE
1621

1722
// Declarations from Windows SDK specific to Windows 8.1
@@ -100,7 +105,13 @@ void AgileReference::Clear() {
100105
}
101106

102107
DebugOnly<HRESULT> hr = git->RevokeInterfaceFromGlobal(mGitCookie);
108+
#if defined(MOZILLA_INTERNAL_API)
109+
NS_WARNING_ASSERTION(SUCCEEDED(hr), nsPrintfCString(
110+
"IGlobalInterfaceTable::RevokeInterfaceFromGlobal failed with HRESULT "
111+
"0x%08lX", ((HRESULT)hr)).get());
112+
#else
103113
MOZ_ASSERT(SUCCEEDED(hr));
114+
#endif // defined(MOZILLA_INTERNAL_API)
104115
mGitCookie = 0;
105116
}
106117

0 commit comments

Comments
 (0)