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

Side by Side Diff: client/crashpad_client_mac.cc

Issue 1305893010: Don’t trigger EXC_CORPSE_NOTIFY on OS X 10.11 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 5 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 | « no previous file | client/simulate_crash_mac_test.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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // exception handler for EXC_CRASH, EXC_RESOURCE, and EXC_GUARD. See 10.9.5 200 // exception handler for EXC_CRASH, EXC_RESOURCE, and EXC_GUARD. See 10.9.5
201 // launchd-842.92.1/src/core.c job_setup_exception_port(). Normally, this job 201 // launchd-842.92.1/src/core.c job_setup_exception_port(). Normally, this job
202 // is com.apple.ReportCrash.Root, the systemwide Apple Crash Reporter. Since 202 // is com.apple.ReportCrash.Root, the systemwide Apple Crash Reporter. Since
203 // it is impossible to receive EXC_RESOURCE and EXC_GUARD exceptions through 203 // it is impossible to receive EXC_RESOURCE and EXC_GUARD exceptions through
204 // the EXC_CRASH mechanism, an exception handler must be registered for them 204 // the EXC_CRASH mechanism, an exception handler must be registered for them
205 // by name if it is to receive these exception types. The default task-level 205 // by name if it is to receive these exception types. The default task-level
206 // handler for these exception types is set by launchd in a similar manner. 206 // handler for these exception types is set by launchd in a similar manner.
207 // 207 //
208 // EXC_MASK_RESOURCE and EXC_MASK_GUARD are not available on all systems, and 208 // EXC_MASK_RESOURCE and EXC_MASK_GUARD are not available on all systems, and
209 // the kernel will reject attempts to use them if it does not understand them, 209 // the kernel will reject attempts to use them if it does not understand them,
210 // so AND them with ExcMaskAll(). EXC_MASK_CRASH is not present in 210 // so AND them with ExcMaskValid(). EXC_MASK_CRASH is always supported.
211 // ExcMaskAll() but is always supported. See the documentation for
212 // ExcMaskAll().
213 ExceptionPorts exception_ports(ExceptionPorts::kTargetTypeTask, TASK_NULL); 211 ExceptionPorts exception_ports(ExceptionPorts::kTargetTypeTask, TASK_NULL);
214 if (!exception_ports.SetExceptionPort( 212 if (!exception_ports.SetExceptionPort(
215 EXC_MASK_CRASH | 213 (EXC_MASK_CRASH | EXC_MASK_RESOURCE | EXC_MASK_GUARD) &
216 ((EXC_MASK_RESOURCE | EXC_MASK_GUARD) & ExcMaskAll()), 214 ExcMaskValid(),
217 exception_port_, 215 exception_port_,
218 EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES, 216 EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES,
219 MACHINE_THREAD_STATE)) { 217 MACHINE_THREAD_STATE)) {
220 return false; 218 return false;
221 } 219 }
222 220
223 return true; 221 return true;
224 } 222 }
225 223
226 } // namespace crashpad 224 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | client/simulate_crash_mac_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698