Chromium Code Reviews| Index: chrome/app/breakpad_win.cc |
| =================================================================== |
| --- chrome/app/breakpad_win.cc (revision 29073) |
| +++ chrome/app/breakpad_win.cc (working copy) |
| @@ -134,6 +134,9 @@ |
| std::wstring process_type; |
| }; |
| +// flag to indicate that we are already handling an exception. |
| +volatile LONG handling_exception = 0; |
| + |
| // This callback is executed when the browser process has crashed, after |
| // the crash dump has been created. We need to minimize the amount of work |
| // done here since we have potentially corrupted process. Our job is to |
| @@ -143,6 +146,12 @@ |
| bool DumpDoneCallback(const wchar_t*, const wchar_t*, void*, |
| EXCEPTION_POINTERS* ex_info, |
| MDRawAssertionInfo*, bool) { |
| + // Capture every thread except the first one in the sleep. We don't |
| + // want multiple threads to concurrently execute the rest of the code. |
| + if (::InterlockedCompareExchange(&handling_exception, 1, 0) == 1) { |
| + ::Sleep(INFINITE); |
|
Nicolas Sylvain
2009/10/16 22:58:46
why not just return false?
cpu_(ooo_6.6-7.5)
2009/10/17 00:54:19
Because we are in the exception hander still so th
|
| + } |
| + |
| // If the exception is because there was a problem loading a delay-loaded |
| // module, then show the user a dialog explaining the problem and then exit. |
| if (DelayLoadFailureExceptionMessageBox(ex_info)) |