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

Side by Side Diff: util/mach/mach_extensions.cc

Issue 575823002: Drop 10.5 support (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « util/mach/mach_extensions.h ('k') | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 23 matching lines...) Expand all
34 // rejecting attempts to operate on any bits that it does not recognize. See 34 // rejecting attempts to operate on any bits that it does not recognize. See
35 // 10.9.4 xnu-2422.110.17/osfmk/mach/ipc_host.c and 35 // 10.9.4 xnu-2422.110.17/osfmk/mach/ipc_host.c and
36 // xnu-2422.110.17/osfmk/mach/ipc_tt.c. 36 // xnu-2422.110.17/osfmk/mach/ipc_tt.c.
37 37
38 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 38 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
39 int mac_os_x_minor_version = MacOSXMinorVersion(); 39 int mac_os_x_minor_version = MacOSXMinorVersion();
40 #endif 40 #endif
41 41
42 // See 10.6.8 xnu-1504.15.3/osfmk/mach/exception_types.h. 10.7 uses the same 42 // See 10.6.8 xnu-1504.15.3/osfmk/mach/exception_types.h. 10.7 uses the same
43 // definition as 10.6. See 10.7.5 xnu-1699.32.7/osfmk/mach/exception_types.h 43 // definition as 10.6. See 10.7.5 xnu-1699.32.7/osfmk/mach/exception_types.h
44 //
45 // The 10.5 SDK actually defined EXC_MASK_ALL as including EXC_MASK_CRASH.
46 // Later SDKs removed EXC_MASK_CRASH from EXC_MASK_ALL, but placed it into a
47 // new constant, EXC_MASK_VALID. For consistent behavior, don’t include
48 // EXC_MASK_CRASH in the 10.5 EXC_MASK_ALL. Consumers that want EXC_MASK_ALL
49 // along with EXC_MASK_CRASH must use ExcMaskAll() | EXC_MASK_CRASH
50 // explicitly. 10.5 otherwise behaves identically to 10.6. See 10.5.8
51 // xnu-1228.15.4/osfmk/mach/exception_types.h.
52 const exception_mask_t kExcMaskAll_10_6 = 44 const exception_mask_t kExcMaskAll_10_6 =
53 EXC_MASK_BAD_ACCESS | EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC | 45 EXC_MASK_BAD_ACCESS | EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC |
54 EXC_MASK_EMULATION | EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT | 46 EXC_MASK_EMULATION | EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT |
55 EXC_MASK_SYSCALL | EXC_MASK_MACH_SYSCALL | EXC_MASK_RPC_ALERT | 47 EXC_MASK_SYSCALL | EXC_MASK_MACH_SYSCALL | EXC_MASK_RPC_ALERT |
56 EXC_MASK_MACHINE; 48 EXC_MASK_MACHINE;
57 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_7 49 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_7
58 if (mac_os_x_minor_version <= 7) { 50 if (mac_os_x_minor_version <= 7) {
59 return kExcMaskAll_10_6; 51 return kExcMaskAll_10_6;
60 } 52 }
61 #endif 53 #endif
62 54
63 // 10.8 added EXC_MASK_RESOURCE. See 10.8.5 55 // 10.8 added EXC_MASK_RESOURCE. See 10.8.5
64 // xnu-2050.48.11/osfmk/mach/exception_types.h. 56 // xnu-2050.48.11/osfmk/mach/exception_types.h.
65 const exception_mask_t kExcMaskAll_10_8 = 57 const exception_mask_t kExcMaskAll_10_8 =
66 kExcMaskAll_10_6 | EXC_MASK_RESOURCE; 58 kExcMaskAll_10_6 | EXC_MASK_RESOURCE;
67 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_8 59 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_8
68 if (mac_os_x_minor_version <= 8) { 60 if (mac_os_x_minor_version <= 8) {
69 return kExcMaskAll_10_8; 61 return kExcMaskAll_10_8;
70 } 62 }
71 #endif 63 #endif
72 64
73 // 10.9 added EXC_MASK_GUARD. See 10.9.4 65 // 10.9 added EXC_MASK_GUARD. See 10.9.4
74 // xnu-2422.110.17/osfmk/mach/exception_types.h. 66 // xnu-2422.110.17/osfmk/mach/exception_types.h.
75 const exception_mask_t kExcMaskAll_10_9 = kExcMaskAll_10_8 | EXC_MASK_GUARD; 67 const exception_mask_t kExcMaskAll_10_9 = kExcMaskAll_10_8 | EXC_MASK_GUARD;
76 return kExcMaskAll_10_9; 68 return kExcMaskAll_10_9;
77 } 69 }
78 70
79 } // namespace crashpad 71 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/mach_extensions.h ('k') | util/test/mac/mach_multiprocess.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698