diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 01:22:05 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-19 01:22:05 +0000 |
commit | cafd0b6fa511acc2667af254b782c33c6bb752a7 (patch) | |
tree | 5d05f2ae5141161102ee3895ae113d2a31f1ec53 /chrome | |
parent | 6672819325d03b09c4e511e13ed60547813595cf (diff) | |
download | chromium_src-cafd0b6fa511acc2667af254b782c33c6bb752a7.zip chromium_src-cafd0b6fa511acc2667af254b782c33c6bb752a7.tar.gz chromium_src-cafd0b6fa511acc2667af254b782c33c6bb752a7.tar.bz2 |
Disabled the Windows error dialog for the GPU process.
Rather than displaying a modal dialog, LoadLibrary and similar return an error. This allows the GPU process to fail or fall back without interacting with the user.
TEST=try
BUG=69610
Review URL: http://codereview.chromium.org/6271006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/gpu/gpu_main.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/gpu/gpu_main.cc b/chrome/gpu/gpu_main.cc index d094760..44004b4 100644 --- a/chrome/gpu/gpu_main.cc +++ b/chrome/gpu/gpu_main.cc @@ -4,6 +4,10 @@ #include <stdlib.h> +#if defined(OS_WIN) +#include <windows.h> +#endif + #include "app/win/scoped_com_initializer.h" #include "base/environment.h" #include "base/message_loop.h" @@ -51,6 +55,13 @@ int GpuMain(const MainFunctionParams& parameters) { MessageLoop main_message_loop(MessageLoop::TYPE_UI); base::PlatformThread::SetName("CrGpuMain"); +#if defined(OS_WIN) + // Prevent Windows from displaying a modal dialog on failures like not being + // able to load a DLL. + SetErrorMode( + SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); +#endif + app::win::ScopedCOMInitializer com_initializer; #if defined(USE_X11) |