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..46e8588250bbce2db9afdbadcd6909f8ebe49370 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" |
@@ -247,8 +248,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 +288,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; |
@@ -382,8 +383,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; |
@@ -722,4 +723,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 |