Index: util/mach/exc_server_variants.cc |
diff --git a/util/mach/exc_server_variants.cc b/util/mach/exc_server_variants.cc |
index c57492f9d994d4ea59b4976180b0bd9d0e56d829..20b894a7b42b29e97e22c32a4ee200070adbdfc9 100644 |
--- a/util/mach/exc_server_variants.cc |
+++ b/util/mach/exc_server_variants.cc |
@@ -20,6 +20,7 @@ |
#include "base/basictypes.h" |
#include "base/logging.h" |
#include "util/mach/exc.h" |
+#include "util/mach/exception_behaviors.h" |
#include "util/mach/excServer.h" |
#include "util/mach/mach_exc.h" |
#include "util/mach/mach_excServer.h" |
@@ -201,8 +202,7 @@ namespace crashpad { |
namespace internal { |
ExcServer::ExcServer(ExcServer::Interface* interface) |
- : MachMessageServer::Interface(), |
Robert Sesek
2014/09/17 15:29:38
Not sure these clang-format changes are improvemen
Mark Mentovai
2014/09/17 15:35:38
rsesek wrote:
|
- interface_(interface) { |
+ : MachMessageServer::Interface(), interface_(interface) { |
} |
bool ExcServer::MachMessageServerFunction(const mach_msg_header_t* in_header, |
@@ -247,8 +247,8 @@ bool ExcServer::MachMessageServerFunction(const mach_msg_header_t* in_header, |
// in_request_1 is used for the portion of the request after the codes, |
// which in theory can be variable-length. The check function will set it. |
const Request* in_request_1; |
- kern_return_t kr = MIGCheckRequestExceptionRaiseState( |
- in_request, &in_request_1); |
+ kern_return_t kr = |
+ MIGCheckRequestExceptionRaiseState(in_request, &in_request_1); |
if (kr != MACH_MSG_SUCCESS) { |
SetReplyError(out_header, kr); |
return true; |
@@ -287,8 +287,8 @@ bool ExcServer::MachMessageServerFunction(const mach_msg_header_t* in_header, |
// in_request_1 is used for the portion of the request after the codes, |
// which in theory can be variable-length. The check function will set it. |
const Request* in_request_1; |
- kern_return_t kr = MIGCheckRequestExceptionRaiseStateIdentity( |
- in_request, &in_request_1); |
+ kern_return_t kr = |
+ MIGCheckRequestExceptionRaiseStateIdentity(in_request, &in_request_1); |
if (kr != MACH_MSG_SUCCESS) { |
SetReplyError(out_header, kr); |
return true; |
@@ -335,8 +335,7 @@ mach_msg_size_t ExcServer::MachMessageServerReplySize() { |
} |
MachExcServer::MachExcServer(MachExcServer::Interface* interface) |
- : MachMessageServer::Interface(), |
- interface_(interface) { |
+ : MachMessageServer::Interface(), interface_(interface) { |
} |
bool MachExcServer::MachMessageServerFunction( |
@@ -382,8 +381,8 @@ bool MachExcServer::MachMessageServerFunction( |
// in_request_1 is used for the portion of the request after the codes, |
// which in theory can be variable-length. The check function will set it. |
const Request* in_request_1; |
- kern_return_t kr = MIGCheckRequestMachExceptionRaiseState( |
- in_request, &in_request_1); |
+ kern_return_t kr = |
+ MIGCheckRequestMachExceptionRaiseState(in_request, &in_request_1); |
if (kr != MACH_MSG_SUCCESS) { |
SetReplyError(out_header, kr); |
return true; |
@@ -471,9 +470,7 @@ mach_msg_size_t MachExcServer::MachMessageServerReplySize() { |
SimplifiedExcServer::SimplifiedExcServer( |
SimplifiedExcServer::Interface* interface) |
- : ExcServer(this), |
- ExcServer::Interface(), |
- interface_(interface) { |
+ : ExcServer(this), ExcServer::Interface(), interface_(interface) { |
} |
kern_return_t SimplifiedExcServer::CatchExceptionRaise( |
@@ -557,9 +554,7 @@ kern_return_t SimplifiedExcServer::CatchExceptionRaiseStateIdentity( |
SimplifiedMachExcServer::SimplifiedMachExcServer( |
SimplifiedMachExcServer::Interface* interface) |
- : MachExcServer(this), |
- MachExcServer::Interface(), |
- interface_(interface) { |
+ : MachExcServer(this), MachExcServer::Interface(), interface_(interface) { |
} |
kern_return_t SimplifiedMachExcServer::CatchMachExceptionRaise( |
@@ -722,4 +717,13 @@ kern_return_t UniversalMachExcServer::CatchException( |
destroy_complex_request); |
} |
+kern_return_t ExcServerSuccessfulReturnValue(exception_behavior_t behavior, |
+ bool set_thread_state) { |
+ if (!set_thread_state && ExceptionBehaviorHasState(behavior)) { |
+ return MACH_RCV_PORT_DIED; |
+ } |
+ |
+ return KERN_SUCCESS; |
+} |
+ |
} // namespace crashpad |