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

Side by Side Diff: client/crashpad_client_mac.cc

Issue 1095273003: crashpad client for windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: cleanup Created 5 years, 8 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
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } else if (WEXITSTATUS(status) != EXIT_SUCCESS) { 170 } else if (WEXITSTATUS(status) != EXIT_SUCCESS) {
171 LOG(WARNING) << "intermediate process: exit status " << WEXITSTATUS(status); 171 LOG(WARNING) << "intermediate process: exit status " << WEXITSTATUS(status);
172 } 172 }
173 173
174 // Rendezvous with the handler running in the grandchild process. 174 // Rendezvous with the handler running in the grandchild process.
175 exception_port_.reset(child_port_handshake.RunServer()); 175 exception_port_.reset(child_port_handshake.RunServer());
176 176
177 return exception_port_ ? true : false; 177 return exception_port_ ? true : false;
178 } 178 }
179 179
180 bool SetHandler(const std::string& ipc_port) {
181 // This is not implemented for Mac. See crashpad_client_win.cc.
182 return false;
183 }
184
180 bool CrashpadClient::UseHandler() { 185 bool CrashpadClient::UseHandler() {
181 DCHECK_NE(exception_port_, kMachPortNull); 186 DCHECK_NE(exception_port_, kMachPortNull);
182 187
183 // Set the exception handler for EXC_CRASH, EXC_RESOURCE, and EXC_GUARD. 188 // Set the exception handler for EXC_CRASH, EXC_RESOURCE, and EXC_GUARD.
184 // 189 //
185 // EXC_CRASH is how most crashes are received. Most other exception types such 190 // EXC_CRASH is how most crashes are received. Most other exception types such
186 // as EXC_BAD_ACCESS are delivered to a host-level exception handler in the 191 // as EXC_BAD_ACCESS are delivered to a host-level exception handler in the
187 // kernel where they are converted to POSIX signals. See 10.9.5 192 // kernel where they are converted to POSIX signals. See 10.9.5
188 // xnu-2422.115.4/bsd/uxkern/ux_exception.c catch_mach_exception_raise(). If a 193 // xnu-2422.115.4/bsd/uxkern/ux_exception.c catch_mach_exception_raise(). If a
189 // core-generating signal (triggered through this hardware mechanism or a 194 // core-generating signal (triggered through this hardware mechanism or a
(...skipping 28 matching lines...) Expand all
218 exception_port_, 223 exception_port_,
219 EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES, 224 EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES,
220 MACHINE_THREAD_STATE)) { 225 MACHINE_THREAD_STATE)) {
221 return false; 226 return false;
222 } 227 }
223 228
224 return true; 229 return true;
225 } 230 }
226 231
227 } // namespace crashpad 232 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698