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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 reinterpret_cast<WinVMAddress>(&g_exception_information); | 111 reinterpret_cast<WinVMAddress>(&g_exception_information); |
112 | 112 |
113 ServerToClientMessage response = {0}; | 113 ServerToClientMessage response = {0}; |
114 | 114 |
115 if (!SendToCrashHandlerServer( | 115 if (!SendToCrashHandlerServer( |
116 base::UTF8ToUTF16(ipc_port), message, &response)) { | 116 base::UTF8ToUTF16(ipc_port), message, &response)) { |
117 return false; | 117 return false; |
118 } | 118 } |
119 | 119 |
120 // The server returns these already duplicated to be valid in this process. | 120 // The server returns these already duplicated to be valid in this process. |
121 g_signal_exception = | 121 g_signal_exception = reinterpret_cast<HANDLE>( |
122 reinterpret_cast<HANDLE>(response.registration.request_report_event); | 122 static_cast<uintptr_t>(response.registration.request_report_event)); |
123 return true; | 123 return true; |
124 } | 124 } |
125 | 125 |
126 bool CrashpadClient::UseHandler() { | 126 bool CrashpadClient::UseHandler() { |
127 if (g_signal_exception == INVALID_HANDLE_VALUE) | 127 if (g_signal_exception == INVALID_HANDLE_VALUE) |
128 return false; | 128 return false; |
129 // In theory we could store the previous handler but it is not clear what | 129 // In theory we could store the previous handler but it is not clear what |
130 // use we have for it. | 130 // use we have for it. |
131 SetUnhandledExceptionFilter(&UnhandledExceptionHandler); | 131 SetUnhandledExceptionFilter(&UnhandledExceptionHandler); |
132 return true; | 132 return true; |
133 } | 133 } |
134 | 134 |
135 } // namespace crashpad | 135 } // namespace crashpad |
OLD | NEW |