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: util/mach/mach_extensions.h

Issue 567283002: Add exc_client_variants (UniversalRaiseException()) and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Rename to stay closer to the names traditionally used by Mach Created 6 years, 3 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
Index: util/mach/mach_extensions.h
diff --git a/util/mach/mach_extensions.h b/util/mach/mach_extensions.h
index 81e9a86a97f6f72b486f53606e3d594827010696..deb1501cfe17403cb983b5da56fda02ad43e422e 100644
--- a/util/mach/mach_extensions.h
+++ b/util/mach/mach_extensions.h
@@ -28,6 +28,14 @@ namespace crashpad {
//! assertions.
const mach_port_t kMachPortNull = MACH_PORT_NULL;
+//! \brief `MACH_EXCEPTION_CODES` with the correct type for a Mach exception
+//! behavior, `exception_behavior_t`.
+//!
+//! Signedness problems can occur when ORing `MACH_EXCEPTION_CODES` as a signed
+//! integer, because a signed integer overflow results. This constant can be
+//! used instead of `MACH_EXCEPTION_CODES` in such cases.
+const exception_behavior_t kMachExceptionCodes = MACH_EXCEPTION_CODES;
+
// Because exception_mask_t is an int and has one bit for each defined
// exception_type_t, it’s reasonable to assume that there cannot be any
// officially-defined exception_type_t values higher than 31.

Powered by Google App Engine
This is Rietveld 408576698