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

Unified Diff: chrome/app/delay_load_hook_win.cc

Issue 1959413002: Allow building with VS 2015 Update 3 pre-release (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update toolchain, make it depend on env, and add #if Created 4 years, 7 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 | « build/vs_toolchain.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/delay_load_hook_win.cc
diff --git a/chrome/app/delay_load_hook_win.cc b/chrome/app/delay_load_hook_win.cc
index 52384d411e1ec4120fdbfd3a7cbb53f68d3ec588..fdbf540d7f6c1c1a83beba9f9b6a9557f9d6345b 100644
--- a/chrome/app/delay_load_hook_win.cc
+++ b/chrome/app/delay_load_hook_win.cc
@@ -16,8 +16,18 @@
// Alternatively referencing the ChromeDelayLoadHook function somehow will
// cause this declaration of these variables to take preference to the delay
// load runtime's defaults (in delayimp.lib).
+#if _MSC_FULL_VER >= 190024112
+// Prior to Visual Studio 2015 Update 3, these hooks were non-const. They were
+// made const to improve security (global, writable function pointers are bad).
+// This #ifdef is needed for testing of VS 2015 Update 3 pre-release and can be
+// removed when we formally switch to Update 3 or higher.
+// TODO(612313): remove the #if when we update toolchains.
+const PfnDliHook __pfnDliNotifyHook2 = ChromeDelayLoadHook;
+const PfnDliHook __pfnDliFailureHook2 = ChromeDelayLoadHook;
+#else
PfnDliHook __pfnDliNotifyHook2 = ChromeDelayLoadHook;
PfnDliHook __pfnDliFailureHook2 = ChromeDelayLoadHook;
+#endif
namespace {
« no previous file with comments | « build/vs_toolchain.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698