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

Unified Diff: skia/ext/SkMemory_new_handler.cpp

Issue 2173463002: Make base::TerminateBecauseOutOfMemory call RaiseException on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittests Created 4 years, 5 months 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
« base/process/memory_win.cc ('K') | « base/process/memory_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/SkMemory_new_handler.cpp
diff --git a/skia/ext/SkMemory_new_handler.cpp b/skia/ext/SkMemory_new_handler.cpp
index b45ad1cd4eec0c58e3e765480e55b8a3f6f03dc1..c90a892182e2e58486836cbf28a4e21ab880bfd5 100644
--- a/skia/ext/SkMemory_new_handler.cpp
+++ b/skia/ext/SkMemory_new_handler.cpp
@@ -34,13 +34,8 @@ void sk_abort_no_print() {
void sk_out_of_memory(void) {
SkASSERT(!"sk_out_of_memory");
-#if defined(OS_WIN)
- // Kill the process. This is important for security since most of code
- // does not check the result of memory allocation.
- // https://msdn.microsoft.com/en-us/library/het71c37.aspx
- ::RaiseException(base::win::kOomExceptionCode, EXCEPTION_NONCONTINUABLE, 0,
- nullptr);
-#endif
+ base::TerminateBecauseOutOfMemory(0);
+ // Extra safety abort().
abort();
}
« base/process/memory_win.cc ('K') | « base/process/memory_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698