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

Unified Diff: util/win/process_info.h

Issue 1407643004: Some plumbing for the beginning of getting handles into snapshot/minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@handles-redux
Patch Set: . Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/win/process_snapshot_win.cc ('k') | util/win/process_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/process_info.h
diff --git a/util/win/process_info.h b/util/win/process_info.h
index 019e945c6e0ad3124688135dad0d091068589db4..41b92598c7a59c5728f7ce032ef5d61361544973 100644
--- a/util/win/process_info.h
+++ b/util/win/process_info.h
@@ -140,7 +140,7 @@ class ProcessInfo {
const CheckedRange<WinVMAddress, WinVMSize>& range) const;
//! \brief Retrieves information about open handles in the target process.
- const std::vector<Handle>& Handles();
+ const std::vector<Handle>& Handles() const;
private:
template <class Traits>
@@ -168,7 +168,11 @@ class ProcessInfo {
WinVMSize peb_size_;
std::vector<Module> modules_;
std::vector<MEMORY_BASIC_INFORMATION64> memory_info_;
- std::vector<Handle> handles_;
+
+ // Handles() is logically const, but updates this member on first retrieval.
+ // See https://code.google.com/p/crashpad/issues/detail?id=9.
+ mutable std::vector<Handle> handles_;
+
bool is_64_bit_;
bool is_wow64_;
InitializationStateDcheck initialized_;
« no previous file with comments | « snapshot/win/process_snapshot_win.cc ('k') | util/win/process_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698