diff --git a/widget/windows/WindowsUIUtils.cpp b/widget/windows/WindowsUIUtils.cpp index daa12793140b..4eb1c1f6e90b 100644 --- a/widget/windows/WindowsUIUtils.cpp +++ b/widget/windows/WindowsUIUtils.cpp @@ -273,6 +273,7 @@ WindowsUIUtils::UpdateTabletModeState() { return NS_OK; } +#ifndef __MINGW32__ struct HStringDeleter { typedef HSTRING pointer; void operator()(pointer aString) { WindowsDeleteString(aString); } @@ -286,21 +287,20 @@ mozilla::Result ConvertToWindowsString( HRESULT hr = WindowsCreateString(PromiseFlatString(aStr).get(), aStr.Length(), &rawStr); if (FAILED(hr)) { - return Err(hr); + return mozilla::Err(hr); } return HStringUniquePtr(rawStr); } -#ifndef __MINGW32__ mozilla::Result RequestShare( const std::function& aCallback) { if (!IsWin10OrLater()) { - return Err(NS_ERROR_FAILURE); + return mozilla::Err(NS_ERROR_FAILURE); } HWND hwnd = GetForegroundWindow(); if (!hwnd) { - return Err(NS_ERROR_FAILURE); + return mozilla::Err(NS_ERROR_FAILURE); } ComPtr dtmInterop; @@ -313,7 +313,7 @@ mozilla::Result RequestShare( IID_PPV_ARGS(&dtmInterop)); if (FAILED(hr) || FAILED(dtmInterop->GetForWindow(hwnd, IID_PPV_ARGS(&dtm)))) { - return Err(NS_ERROR_FAILURE); + return mozilla::Err(NS_ERROR_FAILURE); } auto callback = Callback< @@ -326,7 +326,7 @@ mozilla::Result RequestShare( EventRegistrationToken dataRequestedToken; if (FAILED(dtm->add_DataRequested(callback.Get(), &dataRequestedToken)) || FAILED(dtmInterop->ShowShareUIForWindow(hwnd))) { - return Err(NS_ERROR_FAILURE); + return mozilla::Err(NS_ERROR_FAILURE); } return Ok(); @@ -336,8 +336,8 @@ mozilla::Result RequestShare( RefPtr WindowsUIUtils::Share(nsAutoString aTitle, nsAutoString aText, nsAutoString aUrl) { - auto promiseHolder = MakeRefPtr< - mozilla::media::Refcountable>>(); + auto promiseHolder = mozilla::MakeRefPtr< + mozilla::media::Refcountable>>(); RefPtr promise = promiseHolder->Ensure(__func__); #ifndef __MINGW32__