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

Unified Diff: tools/catch_exception_tool.cc

Issue 756803002: Add a ReceiveLarge parameter to MachMessageServer::Run() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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 | « snapshot/mac/mach_o_image_annotations_reader_test.cc ('k') | util/mach/exc_client_variants_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/catch_exception_tool.cc
diff --git a/tools/catch_exception_tool.cc b/tools/catch_exception_tool.cc
index 65de259943c508f268595e7a073144d6ed9ff57c..b18f9b5dbac12c75a37e1a12e7ba7adbc7ad465a 100644
--- a/tools/catch_exception_tool.cc
+++ b/tools/catch_exception_tool.cc
@@ -275,6 +275,13 @@ int CatchExceptionToolMain(int argc, char* argv[]) {
int exceptions_handled = 0;
ExceptionServer exception_server(options, me, &exceptions_handled);
+ // Assume that if persistent mode has been requested, it’s desirable to ignore
+ // large messages and keep running.
+ MachMessageServer::ReceiveLarge receive_large =
+ (options.persistent == MachMessageServer::kPersistent)
+ ? MachMessageServer::kReceiveLargeIgnore
+ : MachMessageServer::kReceiveLargeError;
+
mach_msg_timeout_t timeout_ms = options.timeout_secs
? options.timeout_secs * 1000
: MACH_MSG_TIMEOUT_NONE;
@@ -284,6 +291,7 @@ int CatchExceptionToolMain(int argc, char* argv[]) {
MACH_MSG_OPTION_NONE,
options.persistent,
options.nonblocking,
+ receive_large,
timeout_ms);
if (mr == MACH_RCV_TIMED_OUT && options.timeout_secs && options.persistent &&
exceptions_handled) {
« no previous file with comments | « snapshot/mac/mach_o_image_annotations_reader_test.cc ('k') | util/mach/exc_client_variants_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698