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

Unified Diff: chrome_elf/chrome_elf_main.cc

Issue 2422643002: Windows install_static refactor. (Closed)
Patch Set: sync to position 427054 Created 4 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
Index: chrome_elf/chrome_elf_main.cc
diff --git a/chrome_elf/chrome_elf_main.cc b/chrome_elf/chrome_elf_main.cc
index 95e0a415c41cb988fb256fe91ce2a12e9567d437..a4b52c6326482a707bd2161b3e3edeea47371d07 100644
--- a/chrome_elf/chrome_elf_main.cc
+++ b/chrome_elf/chrome_elf_main.cc
@@ -7,7 +7,9 @@
#include <assert.h>
#include <windows.h>
+#include "chrome/install_static/install_details.h"
#include "chrome/install_static/install_util.h"
+#include "chrome/install_static/product_install_details.h"
#include "chrome_elf/blacklist/blacklist.h"
#include "chrome_elf/crash/crash_helper.h"
@@ -26,12 +28,18 @@ void SignalChromeElf() {
blacklist::ResetBeacon();
}
+extern "C" intptr_t GetInstallDetailsPayload() {
+ return install_static::InstallDetails::Get().GetPayload();
+}
+
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
if (reason == DLL_PROCESS_ATTACH) {
-// CRT on initialization installs an exception filter which calls
-// TerminateProcess. We need to hook CRT's attempt to set an exception.
-// NOTE: Do not hook if ASan is present, or ASan will fail to install
-// its own unhandled exception filter.
+ install_static::InitializeProductDetailsForModule();
+
+ // CRT on initialization installs an exception filter which calls
+ // TerminateProcess. We need to hook CRT's attempt to set an exception.
+ // NOTE: Do not hook if ASan is present, or ASan will fail to install
+ // its own unhandled exception filter.
#if !defined(ADDRESS_SANITIZER)
elf_crash::DisableSetUnhandledExceptionFilter();
#endif // !defined (ADDRESS_SANITIZER)

Powered by Google App Engine
This is Rietveld 408576698