| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (argc != 2) { | 68 if (argc != 2) { |
| 69 fprintf(stderr, "Usage: %ls <server_pipe_name>\n", argv[0]); | 69 fprintf(stderr, "Usage: %ls <server_pipe_name>\n", argv[0]); |
| 70 return EXIT_FAILURE; | 70 return EXIT_FAILURE; |
| 71 } | 71 } |
| 72 | 72 |
| 73 CrashpadClient client; | 73 CrashpadClient client; |
| 74 if (!client.SetHandlerIPCPipe(argv[1])) { | 74 if (!client.SetHandlerIPCPipe(argv[1])) { |
| 75 LOG(ERROR) << "SetHandler"; | 75 LOG(ERROR) << "SetHandler"; |
| 76 return EXIT_FAILURE; | 76 return EXIT_FAILURE; |
| 77 } | 77 } |
| 78 if (!client.UseHandler()) { | |
| 79 LOG(ERROR) << "UseHandler"; | |
| 80 return EXIT_FAILURE; | |
| 81 } | |
| 82 | 78 |
| 83 if (!FreeOwnStackAndBreak()) | 79 if (!FreeOwnStackAndBreak()) |
| 84 return EXIT_FAILURE; | 80 return EXIT_FAILURE; |
| 85 | 81 |
| 86 // This will never be reached. On success, we'll have crashed above, or | 82 // This will never be reached. On success, we'll have crashed above, or |
| 87 // otherwise returned before here. | 83 // otherwise returned before here. |
| 88 return EXIT_SUCCESS; | 84 return EXIT_SUCCESS; |
| 89 } | 85 } |
| 90 | 86 |
| 91 } // namespace | 87 } // namespace |
| 92 } // namespace crashpad | 88 } // namespace crashpad |
| 93 | 89 |
| 94 int wmain(int argc, wchar_t* argv[]) { | 90 int wmain(int argc, wchar_t* argv[]) { |
| 95 return crashpad::SelfDestroyingMain(argc, argv); | 91 return crashpad::SelfDestroyingMain(argc, argv); |
| 96 } | 92 } |
| OLD | NEW |