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

Unified Diff: components/crash/content/app/run_as_crashpad_handler_win.cc

Issue 2674253003: Populate allocation size into OOM exception on Windows. (Closed)
Patch Set: Address Will's comment. Created 3 years, 10 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
« no previous file with comments | « 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: components/crash/content/app/run_as_crashpad_handler_win.cc
diff --git a/components/crash/content/app/run_as_crashpad_handler_win.cc b/components/crash/content/app/run_as_crashpad_handler_win.cc
index e51cfd77e001452f2efe36fbd6f9d3dfcd87fd12..20be2d108cf68043bd69d11ccc3318d189d18c2d 100644
--- a/components/crash/content/app/run_as_crashpad_handler_win.cc
+++ b/components/crash/content/app/run_as_crashpad_handler_win.cc
@@ -10,6 +10,7 @@
#include <vector>
#include "base/command_line.h"
+#include "base/process/memory.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -18,6 +19,10 @@
namespace crash_reporter {
int RunAsCrashpadHandler(const base::CommandLine& command_line) {
+ // Make sure this process terminates on OOM in the same mode as other Chrome
+ // processes.
+ base::EnableTerminationOnOutOfMemory();
+
std::vector<base::string16> argv = command_line.argv();
const base::string16 process_type = L"--type=";
argv.erase(std::remove_if(argv.begin(), argv.end(),
« no previous file with comments | « base/process/memory_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698