| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 static bool IsClientRequestValid(const ProtocolMessage& msg) { | 79 static bool IsClientRequestValid(const ProtocolMessage& msg) { |
| 80 return msg.tag == MESSAGE_TAG_UPLOAD_REQUEST || | 80 return msg.tag == MESSAGE_TAG_UPLOAD_REQUEST || |
| 81 (msg.tag == MESSAGE_TAG_REGISTRATION_REQUEST && | 81 (msg.tag == MESSAGE_TAG_REGISTRATION_REQUEST && |
| 82 msg.id != 0 && | 82 msg.id != 0 && |
| 83 msg.thread_id != NULL && | 83 msg.thread_id != NULL && |
| 84 msg.exception_pointers != NULL && | 84 msg.exception_pointers != NULL && |
| 85 msg.assert_info != NULL); | 85 msg.assert_info != NULL); |
| 86 } | 86 } |
| 87 | 87 |
| 88 #ifdef _DEBUG | 88 #ifndef NDEBUG |
| 89 static bool CheckForIOIncomplete(bool success) { | 89 static bool CheckForIOIncomplete(bool success) { |
| 90 // We should never get an I/O incomplete since we should not execute this | 90 // We should never get an I/O incomplete since we should not execute this |
| 91 // unless the operation has finished and the overlapped event is signaled. If | 91 // unless the operation has finished and the overlapped event is signaled. If |
| 92 // we do get INCOMPLETE, we have a bug in our code. | 92 // we do get INCOMPLETE, we have a bug in our code. |
| 93 return success ? false : (GetLastError() == ERROR_IO_INCOMPLETE); | 93 return success ? false : (GetLastError() == ERROR_IO_INCOMPLETE); |
| 94 } | 94 } |
| 95 #endif | 95 #endif |
| 96 | 96 |
| 97 CrashGenerationServer::CrashGenerationServer( | 97 CrashGenerationServer::CrashGenerationServer( |
| 98 const std::wstring& pipe_name, | 98 const std::wstring& pipe_name, |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 client.assert_info(), | 922 client.assert_info(), |
| 923 client.dump_type(), | 923 client.dump_type(), |
| 924 true); | 924 true); |
| 925 if (!dump_generator.GenerateDumpFile(dump_path)) { | 925 if (!dump_generator.GenerateDumpFile(dump_path)) { |
| 926 return false; | 926 return false; |
| 927 } | 927 } |
| 928 return dump_generator.WriteMinidump(); | 928 return dump_generator.WriteMinidump(); |
| 929 } | 929 } |
| 930 | 930 |
| 931 } // namespace google_breakpad | 931 } // namespace google_breakpad |
| OLD | NEW |