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

Side by Side Diff: client/crashpad_client.h

Issue 1386943002: mac: Make UseSystemDefaultHandler() clear handlers on failure (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 2 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/crashpad_client_mac.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 //! 121 //!
122 //! \return `true` on success, `false` on failure with a message logged. 122 //! \return `true` on success, `false` on failure with a message logged.
123 bool UseHandler(); 123 bool UseHandler();
124 124
125 #if defined(OS_MACOSX) || DOXYGEN 125 #if defined(OS_MACOSX) || DOXYGEN
126 //! \brief Configures the process to direct its crashes to the default handler 126 //! \brief Configures the process to direct its crashes to the default handler
127 //! for the operating system. 127 //! for the operating system.
128 //! 128 //!
129 //! On OS X, this sets the task’s exception port as in UseHandler(), but the 129 //! On OS X, this sets the task’s exception port as in UseHandler(), but the
130 //! exception handler used is obtained from SystemCrashReporterHandler(). If 130 //! exception handler used is obtained from SystemCrashReporterHandler(). If
131 //! the system’s crash reporter handler cannot be determined, the task’s 131 //! the system’s crash reporter handler cannot be determined or set, the
132 //! exception ports for crash-type exceptions are cleared. 132 //! task’s exception ports for crash-type exceptions are cleared.
133 //! 133 //!
134 //! Use of this function is strongly discouraged. 134 //! Use of this function is strongly discouraged.
135 //! 135 //!
136 //! \warning After a successful call to this function, Crashpad will no longer 136 //! \warning After a call to this function, Crashpad will no longer monitor
137 //! monitor the process for crashes until a subsequent call to 137 //! the process for crashes until a subsequent call to UseHandler().
138 //! UseHandler().
139 //! 138 //!
140 //! \note This is provided as a static function to allow it to be used in 139 //! \note This is provided as a static function to allow it to be used in
141 //! situations where a CrashpadClient object is not otherwise available. 140 //! situations where a CrashpadClient object is not otherwise available.
142 //! This may be useful when a child process inherits its parent’s Crashpad 141 //! This may be useful when a child process inherits its parent’s Crashpad
143 //! handler, but wants to sever this tie. 142 //! handler, but wants to sever this tie.
144 //! 143 static void UseSystemDefaultHandler();
145 //! \return `true` on success, `false` on failure with a message logged.
146 static bool UseSystemDefaultHandler();
147 #endif 144 #endif
148 145
149 private: 146 private:
150 #if defined(OS_MACOSX) 147 #if defined(OS_MACOSX)
151 base::mac::ScopedMachSendRight exception_port_; 148 base::mac::ScopedMachSendRight exception_port_;
152 #endif 149 #endif
153 150
154 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); 151 DISALLOW_COPY_AND_ASSIGN(CrashpadClient);
155 }; 152 };
156 153
157 } // namespace crashpad 154 } // namespace crashpad
158 155
159 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ 156 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | client/crashpad_client_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698