| OLD | NEW |
| 1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 return ReadFile(pipe, out_buffer, out_size, bytes_count, NULL) != FALSE; | 89 return ReadFile(pipe, out_buffer, out_size, bytes_count, NULL) != FALSE; |
| 90 } | 90 } |
| 91 **/ | 91 **/ |
| 92 | 92 |
| 93 CrashGenerationClient::CrashGenerationClient( | 93 CrashGenerationClient::CrashGenerationClient( |
| 94 const wchar_t* pipe_name, | 94 const wchar_t* pipe_name, |
| 95 MINIDUMP_TYPE dump_type, | 95 MINIDUMP_TYPE dump_type, |
| 96 const CustomClientInfo* custom_info) | 96 const CustomClientInfo* custom_info) |
| 97 : pipe_name_(pipe_name), | 97 : pipe_name_(pipe_name), |
| 98 pipe_handle_(NULL), | 98 pipe_handle_(NULL), |
| 99 custom_info_(), |
| 99 dump_type_(dump_type), | 100 dump_type_(dump_type), |
| 100 thread_id_(0), | |
| 101 server_process_id_(0), | |
| 102 crash_event_(NULL), | 101 crash_event_(NULL), |
| 103 crash_generated_(NULL), | 102 crash_generated_(NULL), |
| 104 server_alive_(NULL), | 103 server_alive_(NULL), |
| 105 exception_pointers_(NULL), | 104 server_process_id_(0), |
| 106 custom_info_() { | 105 thread_id_(0), |
| 106 exception_pointers_(NULL) { |
| 107 memset(&assert_info_, 0, sizeof(assert_info_)); | 107 memset(&assert_info_, 0, sizeof(assert_info_)); |
| 108 if (custom_info) { | 108 if (custom_info) { |
| 109 custom_info_ = *custom_info; | 109 custom_info_ = *custom_info; |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 CrashGenerationClient::CrashGenerationClient( | 113 CrashGenerationClient::CrashGenerationClient( |
| 114 HANDLE pipe_handle, | 114 HANDLE pipe_handle, |
| 115 MINIDUMP_TYPE dump_type, | 115 MINIDUMP_TYPE dump_type, |
| 116 const CustomClientInfo* custom_info) | 116 const CustomClientInfo* custom_info) |
| 117 : pipe_name_(), | 117 : pipe_name_(), |
| 118 pipe_handle_(pipe_handle), | 118 pipe_handle_(pipe_handle), |
| 119 custom_info_(), |
| 119 dump_type_(dump_type), | 120 dump_type_(dump_type), |
| 120 thread_id_(0), | |
| 121 server_process_id_(0), | |
| 122 crash_event_(NULL), | 121 crash_event_(NULL), |
| 123 crash_generated_(NULL), | 122 crash_generated_(NULL), |
| 124 server_alive_(NULL), | 123 server_alive_(NULL), |
| 125 exception_pointers_(NULL), | 124 server_process_id_(0), |
| 126 custom_info_() { | 125 thread_id_(0), |
| 126 exception_pointers_(NULL) { |
| 127 memset(&assert_info_, 0, sizeof(assert_info_)); | 127 memset(&assert_info_, 0, sizeof(assert_info_)); |
| 128 if (custom_info) { | 128 if (custom_info) { |
| 129 custom_info_ = *custom_info; | 129 custom_info_ = *custom_info; |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 CrashGenerationClient::~CrashGenerationClient() { | 133 CrashGenerationClient::~CrashGenerationClient() { |
| 134 if (crash_event_) { | 134 if (crash_event_) { |
| 135 CloseHandle(crash_event_); | 135 CloseHandle(crash_event_); |
| 136 } | 136 } |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 396 } |
| 397 | 397 |
| 398 if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { | 398 if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { |
| 399 return INVALID_HANDLE_VALUE; | 399 return INVALID_HANDLE_VALUE; |
| 400 } | 400 } |
| 401 } | 401 } |
| 402 return INVALID_HANDLE_VALUE; | 402 return INVALID_HANDLE_VALUE; |
| 403 } | 403 } |
| 404 | 404 |
| 405 } // namespace google_breakpad | 405 } // namespace google_breakpad |
| OLD | NEW |