From a67ec20363ec7cb66f3889a1d02b42fd2476f922 Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Thu, 21 Apr 2005 18:19:58 +0000 Subject: [PATCH] 153377 disable windows-provided error popups for unresolved symbols, no disk in drive, etc r=neil sr=jag a=asa --- xpfe/bootstrap/nsAppRunner.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/xpfe/bootstrap/nsAppRunner.cpp b/xpfe/bootstrap/nsAppRunner.cpp index a0a24919136..7e54f7ad4fd 100644 --- a/xpfe/bootstrap/nsAppRunner.cpp +++ b/xpfe/bootstrap/nsAppRunner.cpp @@ -119,9 +119,13 @@ #include "nsTraceMalloc.h" #endif -#if defined(DEBUG) && defined(XP_WIN32) +#ifdef XP_WIN32 +#include + +#ifdef DEBUG #include #endif +#endif #if defined (XP_MACOSX) #include @@ -1570,13 +1574,20 @@ int main(int argc, char* argv[]) NS_TIMELINE_MARK("enter main"); int i; //Moved here due to portability guideline 20. See bug 258055 -#if defined(DEBUG) && defined(XP_WIN32) +#ifdef XP_WIN32 + // Suppress the "DLL Foo could not be found" dialog, such that if dependent + // libraries (such as GDI+) are not preset, we gracefully fail to load those + // XPCOM components, instead of being ungraceful. + SetErrorMode(SEM_FAILCRITICALERRORS); + +#ifdef DEBUG // Disable small heap allocator to get heapwalk() giving us // accurate heap numbers. Win2k non-debug does not use small heap allocator. // Win2k debug seems to be still using it. // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__set_sbh_threshold.asp _set_sbh_threshold(0); #endif +#endif #if defined(XP_UNIX) || defined(XP_BEOS) InstallUnixSignalHandlers(argv[0]);