Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 11565026: Crash ppapi processes on Windows when calling exit(), _exit(), abort() and ExitProcess() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main_platform_delegate_win.cc
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index 27d2bbf3af9c24f7b3a84cfb1d46453f73efdfa9..959bee576d3a503332d1e869fa7e5cfc5be679d1 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -4,8 +4,6 @@
#include "content/renderer/renderer_main_platform_delegate.h"
-#include <signal.h>
-
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -42,26 +40,12 @@ void SkiaPreCacheFontCharacters(const LOGFONT& logfont,
}
}
-void __cdecl ForceCrashOnSigAbort(int) {
- *((int*)0) = 0x1337;
-}
-
void InitExitInterceptions() {
// If code subsequently tries to exit using exit(), _exit(), abort(), or
// ExitProcess(), force a crash (since otherwise these would be silent
// terminations and fly under the radar).
base::win::SetShouldCrashOnProcessDetach(true);
-
- // Prevent CRT's abort code from prompting a dialog or trying to "report" it.
- // Disabling the _CALL_REPORTFAULT behavior is important since otherwise it
- // has the sideffect of clearing our exception filter, which means we
- // don't get any crash.
- _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
-
- // Set a SIGABRT handler for good measure. We will crash even if the default
- // is left in place, however this allows us to crash earlier. And it also
- // lets us crash in response to code which might directly call raise(SIGABRT)
- signal(SIGABRT, ForceCrashOnSigAbort);
+ base::win::SetAbortBehaviorForCrashReporting();
}
} // namespace
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698