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

Side by Side Diff: snapshot/win/process_snapshot_win.cc

Issue 1326443007: win: Fix incorrect thread suspend count due to ScopedProcessSuspend (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: assert some threads captured 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
« no previous file with comments | « snapshot/win/process_snapshot_win.h ('k') | snapshot/win/system_snapshot_win_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 20 matching lines...) Expand all
31 report_id_(), 31 report_id_(),
32 client_id_(), 32 client_id_(),
33 annotations_simple_map_(), 33 annotations_simple_map_(),
34 snapshot_time_(), 34 snapshot_time_(),
35 initialized_() { 35 initialized_() {
36 } 36 }
37 37
38 ProcessSnapshotWin::~ProcessSnapshotWin() { 38 ProcessSnapshotWin::~ProcessSnapshotWin() {
39 } 39 }
40 40
41 bool ProcessSnapshotWin::Initialize(HANDLE process) { 41 bool ProcessSnapshotWin::Initialize(HANDLE process,
42 ProcessSuspensionState suspension_state) {
42 INITIALIZATION_STATE_SET_INITIALIZING(initialized_); 43 INITIALIZATION_STATE_SET_INITIALIZING(initialized_);
43 44
44 GetTimeOfDay(&snapshot_time_); 45 GetTimeOfDay(&snapshot_time_);
45 46
46 if (!process_reader_.Initialize(process)) 47 if (!process_reader_.Initialize(process, suspension_state))
47 return false; 48 return false;
48 49
49 system_.Initialize(&process_reader_); 50 system_.Initialize(&process_reader_);
50 51
51 InitializeThreads(); 52 InitializeThreads();
52 InitializeModules(); 53 InitializeModules();
53 54
54 INITIALIZATION_STATE_SET_VALID(initialized_); 55 INITIALIZATION_STATE_SET_VALID(initialized_);
55 return true; 56 return true;
56 } 57 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 for (const ProcessInfo::Module& process_reader_module : 197 for (const ProcessInfo::Module& process_reader_module :
197 process_reader_modules) { 198 process_reader_modules) {
198 auto module = make_scoped_ptr(new internal::ModuleSnapshotWin()); 199 auto module = make_scoped_ptr(new internal::ModuleSnapshotWin());
199 if (module->Initialize(&process_reader_, process_reader_module)) { 200 if (module->Initialize(&process_reader_, process_reader_module)) {
200 modules_.push_back(module.release()); 201 modules_.push_back(module.release());
201 } 202 }
202 } 203 }
203 } 204 }
204 205
205 } // namespace crashpad 206 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/win/process_snapshot_win.h ('k') | snapshot/win/system_snapshot_win_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698