diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-11-28 19:47:44 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-11-28 19:47:44 +0000 |
commit | ed61ae0bbdb965e434b6cd629ca30cc7836163fc (patch) | |
tree | 9f0769b3256aebac643572766d01ec8a71e0194a /src/client/windows/handler/exception_handler.cc | |
parent | Eliminate usage of vector<>[0] for 0-sized vectors in processor library (#84). (diff) | |
download | breakpad-ed61ae0bbdb965e434b6cd629ca30cc7836163fc.tar.xz |
Don't use CRT in exception handler code (#86). r=bryner
http://groups.google.com/group/airbag-dev/browse_thread/thread/f671277ebd6ea7fd
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@73 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/handler/exception_handler.cc')
-rw-r--r-- | src/client/windows/handler/exception_handler.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc index 130add2e..4df0cef3 100644 --- a/src/client/windows/handler/exception_handler.cc +++ b/src/client/windows/handler/exception_handler.cc @@ -173,14 +173,9 @@ bool ExceptionHandler::WriteMinidump(const wstring &dump_path, bool ExceptionHandler::WriteMinidumpWithException(DWORD requesting_thread_id, EXCEPTION_POINTERS *exinfo) { - wchar_t dump_file_name[MAX_PATH]; - WindowsStringUtils::safe_swprintf(dump_file_name, MAX_PATH, L"%s\\%s.dmp", - dump_path_.c_str(), - next_minidump_id_.c_str()); - bool success = false; if (minidump_write_dump_) { - HANDLE dump_file = CreateFile(dump_file_name, + HANDLE dump_file = CreateFile(next_minidump_path_.c_str(), GENERIC_WRITE, FILE_SHARE_WRITE, NULL, @@ -239,6 +234,12 @@ void ExceptionHandler::UpdateNextID() { GUID id; CoCreateGuid(&id); next_minidump_id_ = GUIDString::GUIDToWString(&id); + + wchar_t minidump_path[MAX_PATH]; + WindowsStringUtils::safe_swprintf(minidump_path, MAX_PATH, L"%s\\%s.dmp", + dump_path_.c_str(), + next_minidump_id_.c_str()); + next_minidump_path_ = minidump_path; } } // namespace google_airbag |