Bug 1307223 - Don't warning multiple times about WMF dlls failing to load. r?cpearce
We already report failure in |LoadDlls| on the initial failure to load, there's
no need to warn more than once per session.
MozReview-Commit-ID: FhsR2ZaMSLT
--- a/dom/media/platforms/wmf/WMFUtils.cpp
+++ b/dom/media/platforms/wmf/WMFUtils.cpp
@@ -198,17 +198,19 @@ LoadDLLs()
#define DECL_FUNCTION_PTR(FunctionName, ...) \
typedef HRESULT (STDMETHODCALLTYPE * FunctionName##Ptr_t)(__VA_ARGS__)
HRESULT
MFStartup()
{
HRESULT hr = LoadDLLs();
- NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
+ if (FAILED(hr)) {
+ return hr;
+ }
const int MF_VISTA_VERSION = (0x0001 << 16 | MF_API_VERSION);
const int MF_WIN7_VERSION = (0x0002 << 16 | MF_API_VERSION);
// decltype is unusable for functions having default parameters
DECL_FUNCTION_PTR(MFStartup, ULONG, DWORD);
ENSURE_FUNCTION_PTR_(MFStartup, Mfplat.dll)
if (!IsWin7OrLater())