Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: handler/win/crash_report_exception_handler.cc

Issue 1326443007: win: Fix incorrect thread suspend count due to ScopedProcessSuspend (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 } 41 }
42 42
43 unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException( 43 unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException(
44 HANDLE process, 44 HANDLE process,
45 WinVMAddress exception_information_address) { 45 WinVMAddress exception_information_address) {
46 const unsigned int kFailedTerminationCode = 0xffff7002; 46 const unsigned int kFailedTerminationCode = 0xffff7002;
47 47
48 ScopedProcessSuspend suspend(process); 48 ScopedProcessSuspend suspend(process);
49 49
50 ProcessSnapshotWin process_snapshot; 50 ProcessSnapshotWin process_snapshot;
51 if (!process_snapshot.Initialize(process)) { 51 if (!process_snapshot.Initialize(process,
52 ProcessSuspensionState::kSuspended)) {
52 LOG(WARNING) << "ProcessSnapshotWin::Initialize failed"; 53 LOG(WARNING) << "ProcessSnapshotWin::Initialize failed";
53 return kFailedTerminationCode; 54 return kFailedTerminationCode;
54 } 55 }
55 56
56 if (!process_snapshot.InitializeException(exception_information_address)) { 57 if (!process_snapshot.InitializeException(exception_information_address)) {
57 LOG(WARNING) << "ProcessSnapshotWin::InitializeException failed"; 58 LOG(WARNING) << "ProcessSnapshotWin::InitializeException failed";
58 return kFailedTerminationCode; 59 return kFailedTerminationCode;
59 } 60 }
60 61
61 // Now that we have the exception information, even if something else fails we 62 // Now that we have the exception information, even if something else fails we
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return termination_code; 110 return termination_code;
110 } 111 }
111 112
112 upload_thread_->ReportPending(); 113 upload_thread_->ReportPending();
113 } 114 }
114 115
115 return termination_code; 116 return termination_code;
116 } 117 }
117 118
118 } // namespace crashpad 119 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | snapshot/crashpad_info_client_options_test.cc » ('j') | snapshot/win/process_reader_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698