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

Unified Diff: snapshot/win/module_snapshot_win.h

Issue 1472963002: win: Only call GetFileVersionInfo() once per module (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | snapshot/win/module_snapshot_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/module_snapshot_win.h
diff --git a/snapshot/win/module_snapshot_win.h b/snapshot/win/module_snapshot_win.h
index 54b5539cc37dc810e719ffa3acbdd8908b55ca43..92e5913c3ec85848a7438c9fbd1ea08b023fa048 100644
--- a/snapshot/win/module_snapshot_win.h
+++ b/snapshot/win/module_snapshot_win.h
@@ -17,6 +17,7 @@
#include <stdint.h>
#include <sys/types.h>
+#include <windows.h>
#include <map>
#include <string>
@@ -27,6 +28,7 @@
#include "snapshot/crashpad_info_client_options.h"
#include "snapshot/module_snapshot.h"
#include "snapshot/win/process_reader_win.h"
+#include "util/misc/initialization_state.h"
#include "util/misc/initialization_state_dcheck.h"
#include "util/win/process_info.h"
@@ -89,6 +91,11 @@ class ModuleSnapshotWin final : public ModuleSnapshot {
template <class Traits>
void GetCrashpadOptionsInternal(CrashpadInfoClientOptions* options);
+ // Initializes vs_fixed_file_info_ if it has not yet been initialized, and
+ // returns a pointer to it. Returns nullptr on failure, with a message logged
+ // on the first call.
+ const VS_FIXEDFILEINFO* VSFixedFileInfo() const;
+
std::wstring name_;
std::string pdb_name_;
UUID uuid_;
@@ -98,6 +105,11 @@ class ModuleSnapshotWin final : public ModuleSnapshot {
uint32_t age_;
InitializationStateDcheck initialized_;
+ // VSFixedFileInfo() is logically const, but updates these members on the
+ // the call. See https://crashpad.chromium.org/bug/9.
+ mutable VS_FIXEDFILEINFO vs_fixed_file_info_;
+ mutable InitializationState initialized_vs_fixed_file_info_;
+
DISALLOW_COPY_AND_ASSIGN(ModuleSnapshotWin);
};
« no previous file with comments | « no previous file | snapshot/win/module_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698