OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 bool CrashpadClient::SetHandlerIPCPipe(const std::wstring& ipc_pipe) { | 194 bool CrashpadClient::SetHandlerIPCPipe(const std::wstring& ipc_pipe) { |
195 DCHECK(ipc_pipe_.empty()); | 195 DCHECK(ipc_pipe_.empty()); |
196 DCHECK(!ipc_pipe.empty()); | 196 DCHECK(!ipc_pipe.empty()); |
197 | 197 |
198 ipc_pipe_ = ipc_pipe; | 198 ipc_pipe_ = ipc_pipe; |
199 | 199 |
200 return true; | 200 return true; |
201 } | 201 } |
202 | 202 |
| 203 std::wstring CrashpadClient::GetHandlerIPCPipe() const { |
| 204 DCHECK(!ipc_pipe_.empty()); |
| 205 return ipc_pipe_; |
| 206 } |
| 207 |
203 bool CrashpadClient::UseHandler() { | 208 bool CrashpadClient::UseHandler() { |
204 DCHECK(!ipc_pipe_.empty()); | 209 DCHECK(!ipc_pipe_.empty()); |
205 DCHECK_EQ(g_signal_exception, INVALID_HANDLE_VALUE); | 210 DCHECK_EQ(g_signal_exception, INVALID_HANDLE_VALUE); |
206 DCHECK_EQ(g_signal_non_crash_dump, INVALID_HANDLE_VALUE); | 211 DCHECK_EQ(g_signal_non_crash_dump, INVALID_HANDLE_VALUE); |
207 DCHECK_EQ(g_non_crash_dump_done, INVALID_HANDLE_VALUE); | 212 DCHECK_EQ(g_non_crash_dump_done, INVALID_HANDLE_VALUE); |
208 DCHECK(!g_critical_section_with_debug_info.DebugInfo); | 213 DCHECK(!g_critical_section_with_debug_info.DebugInfo); |
209 | 214 |
210 ClientToServerMessage message; | 215 ClientToServerMessage message; |
211 memset(&message, 0, sizeof(message)); | 216 memset(&message, 0, sizeof(message)); |
212 message.type = ClientToServerMessage::kRegister; | 217 message.type = ClientToServerMessage::kRegister; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 reinterpret_cast<crashpad::WinVMAddress>(&exception_pointers); | 303 reinterpret_cast<crashpad::WinVMAddress>(&exception_pointers); |
299 | 304 |
300 bool set_event_result = !!SetEvent(g_signal_non_crash_dump); | 305 bool set_event_result = !!SetEvent(g_signal_non_crash_dump); |
301 PLOG_IF(ERROR, !set_event_result) << "SetEvent"; | 306 PLOG_IF(ERROR, !set_event_result) << "SetEvent"; |
302 | 307 |
303 DWORD wfso_result = WaitForSingleObject(g_non_crash_dump_done, INFINITE); | 308 DWORD wfso_result = WaitForSingleObject(g_non_crash_dump_done, INFINITE); |
304 PLOG_IF(ERROR, wfso_result != WAIT_OBJECT_0) << "WaitForSingleObject"; | 309 PLOG_IF(ERROR, wfso_result != WAIT_OBJECT_0) << "WaitForSingleObject"; |
305 } | 310 } |
306 | 311 |
307 } // namespace crashpad | 312 } // namespace crashpad |
OLD | NEW |