OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file/namespace contains utility functions for enumerating, ending and | 5 // This file/namespace contains utility functions for enumerating, ending and |
6 // computing statistics of processes. | 6 // computing statistics of processes. |
7 | 7 |
8 #ifndef BASE_PROCESS_UTIL_H_ | 8 #ifndef BASE_PROCESS_UTIL_H_ |
9 #define BASE_PROCESS_UTIL_H_ | 9 #define BASE_PROCESS_UTIL_H_ |
10 | 10 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 bool EnableLowFragmentationHeap(); | 407 bool EnableLowFragmentationHeap(); |
408 | 408 |
409 // Enable 'terminate on heap corruption' flag. Helps protect against heap | 409 // Enable 'terminate on heap corruption' flag. Helps protect against heap |
410 // overflow. Has no effect if the OS doesn't provide the necessary facility. | 410 // overflow. Has no effect if the OS doesn't provide the necessary facility. |
411 void EnableTerminationOnHeapCorruption(); | 411 void EnableTerminationOnHeapCorruption(); |
412 | 412 |
413 // If supported on the platform, and the user has sufficent rights, increase | 413 // If supported on the platform, and the user has sufficent rights, increase |
414 // the current process's scheduling priority to a high priority. | 414 // the current process's scheduling priority to a high priority. |
415 void RaiseProcessToHighPriority(); | 415 void RaiseProcessToHighPriority(); |
416 | 416 |
| 417 #if defined(OS_MACOSX) |
| 418 // Restore the default exception handler, setting it to Apple Crash Reporter |
| 419 // (ReportCrash). When forking and execing a new process, the child will |
| 420 // inherit the parent's exception ports, which may be set to the Breakpad |
| 421 // instance running inside the parent. The parent's Breakpad instance should |
| 422 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
| 423 // in the child after forking will restore the standard exception handler. |
| 424 // See http://crbug.com/20371/ for more details. |
| 425 void RestoreDefaultExceptionHandler(); |
| 426 #endif |
| 427 |
417 } // namespace base | 428 } // namespace base |
418 | 429 |
419 #endif // BASE_PROCESS_UTIL_H_ | 430 #endif // BASE_PROCESS_UTIL_H_ |
OLD | NEW |