Bug 1380092 Return 0 instead of nullptr
nullptr is explicitly not allowed to be cast to an int.
But uintptr_t is an unsigned int that happens to be large
enough to hold a pointer.
Return 0, which is an int.
MozReview-Commit-ID: 2SE76JuJLCo
--- a/ipc/mscom/Utils.cpp
+++ b/ipc/mscom/Utils.cpp
@@ -87,17 +87,17 @@ GetContainingModuleHandle()
HMODULE thisModule = nullptr;
#if defined(_MSC_VER)
thisModule = reinterpret_cast<HMODULE>(&__ImageBase);
#else
if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
GET_MODULE_HANDLE_EX_UNCHANGED_REFCOUNT,
reinterpret_cast<LPCTSTR>(&GetContainingModuleHandle),
&thisModule)) {
- return nullptr;
+ return 0;
}
#endif
return reinterpret_cast<uintptr_t>(thisModule);
}
#if defined(MOZILLA_INTERNAL_API)
void