mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
During debug, toss up a OOM dialog during a failed loadlibrary. NPODB
This commit is contained in:
parent
5ad7dc9eb1
commit
57ba466334
@ -1325,14 +1325,20 @@ MOZCE_SHUNT_API HINSTANCE mozce_LoadLibraryA(LPCSTR lpLibFileName)
|
||||
|
||||
if(wPath) {
|
||||
retval = LoadLibraryW(wPath);
|
||||
free(wPath);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!retval) {
|
||||
mozce_printf("LoadLibraryA failure! %d\n", GetLastError());
|
||||
DWORD error = GetLastError();
|
||||
mozce_printf("LoadLibraryA failure (14==OOM)! %d\n", error);
|
||||
|
||||
if (error == 14)
|
||||
MessageBoxW(NULL, L"Failed to Load Library. Out Of Memory.", wPath, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (wPath)
|
||||
free(wPath);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user