Bug 703491. Part 2: use bools, not nsresults, and silence the rest of the assertions. r=bas

This commit is contained in:
Robert O'Callahan 2011-11-24 12:01:39 +13:00
Родитель a25b86b794
Коммит 328d53c10b
1 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -39,6 +39,7 @@
#include "nsIConsoleService.h"
#include <initguid.h>
#include "Nv3DVUtils.h"
#include "mozilla/Util.h"
DEFINE_GUID(CLSID_NV3DVStreaming,
0xf7747266, 0x777d, 0x4f61, 0xa1, 0x75, 0xdd, 0x5a, 0xdf, 0x1e, 0x37, 0xdf);
@ -127,15 +128,13 @@ Nv3DVUtils::SetDeviceInfo(IUnknown *devUnknown)
bool rv = false;
rv = m3DVStreaming->Nv3DVSetDevice(devUnknown);
if (NS_FAILED(rv)) {
if (rv) {
NS_WARNING("Nv3DVStreaming Nv3DVControl failed!");
return;
}
rv = m3DVStreaming->Nv3DVControl(NV_STEREO_MODE_RIGHT_LEFT, true, FIREFOX_3DV_APP_HANDLE);
if (NS_FAILED(rv)) {
NS_WARNING("Nv3DVStreaming Nv3DVControl failed!");
}
NS_WARN_IF_FALSE(!rv, "Nv3DVStreaming Nv3DVControl failed!");
}
/*
@ -148,8 +147,8 @@ Nv3DVUtils::SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWO
if (!m3DVStreaming)
return;
bool rv = m3DVStreaming->Nv3DVControl(eStereoMode, bEnableStereo, dw3DVAppHandle);
NS_ASSERTION(rv, "Nv3DVStreaming Nv3DVControl failed");
DebugOnly<bool> rv = m3DVStreaming->Nv3DVControl(eStereoMode, bEnableStereo, dw3DVAppHandle);
NS_WARN_IF_FALSE(!rv, "Nv3DVStreaming Nv3DVControl failed!");
}
/*
@ -162,8 +161,8 @@ Nv3DVUtils::SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDL
if (!m3DVStreaming)
return;
bool rv = m3DVStreaming->Nv3DVMetaData((DWORD)dwWidth, (DWORD)dwHeight, hSrcLuma, hDst);
NS_ASSERTION(rv, "Nv3DVStreaming Nv3DVMetaData failed!");
DebugOnly<bool> rv = m3DVStreaming->Nv3DVMetaData((DWORD)dwWidth, (DWORD)dwHeight, hSrcLuma, hDst);
NS_WARN_IF_FALSE(!rv, "Nv3DVStreaming Nv3DVMetaData failed!");
}
} /* namespace layers */