Bug 1268470 - Part 1: Add BLOCK_WIN8_ONLY flag to dll blocklist draft
authorJulien Cristau <jcristau@mozilla.com>
Fri, 08 Sep 2017 11:59:13 +0200
changeset 661509 9b1c5859f678454cde05990e35a9192c36735e2d
parent 661321 50857982881ae7803ceb438fee90650a282f7f05
child 661510 12ce6617cedadd24edde3fad913ff1a327ad8329
push id78795
push userjcristau@mozilla.com
push dateFri, 08 Sep 2017 16:00:44 +0000
bugs1268470
milestone57.0a1
Bug 1268470 - Part 1: Add BLOCK_WIN8_ONLY flag to dll blocklist MozReview-Commit-ID: 8ZhqDv4YMOn
mozglue/build/WindowsDllBlocklist.cpp
--- a/mozglue/build/WindowsDllBlocklist.cpp
+++ b/mozglue/build/WindowsDllBlocklist.cpp
@@ -68,16 +68,17 @@ struct DllBlockInfo {
   //
   // If the CHILD_PROCESSES_ONLY flag is set, then the dll is blocked
   // only when we are a child process.
   unsigned long long maxVersion;
 
   enum {
     FLAGS_DEFAULT = 0,
     BLOCK_WIN8PLUS_ONLY = 1,
+    BLOCK_WIN8_ONLY = 2,
     USE_TIMESTAMP = 4,
     CHILD_PROCESSES_ONLY = 8
   } flags;
 };
 
 static const DllBlockInfo sWindowsDllBlocklist[] = {
   // EXAMPLE:
   // { "uxtheme.dll", ALL_VERSIONS },
@@ -695,16 +696,21 @@ patched_LdrLoadDll (PWCHAR filePath, PUL
     printf_stderr("LdrLoadDll: info->name: '%s'\n", info->name);
 #endif
 
     if ((info->flags & DllBlockInfo::BLOCK_WIN8PLUS_ONLY) &&
         !IsWin8OrLater()) {
       goto continue_loading;
     }
 
+    if ((info->flags & DllBlockInfo::BLOCK_WIN8_ONLY) &&
+        (!IsWin8OrLater() || IsWin8Point1OrLater())) {
+      goto continue_loading;
+    }
+
     if ((info->flags & DllBlockInfo::CHILD_PROCESSES_ONLY) &&
         !(sInitFlags & eDllBlocklistInitFlagIsChildProcess)) {
       goto continue_loading;
     }
 
     unsigned long long fVersion = ALL_VERSIONS;
 
     if (info->maxVersion != ALL_VERSIONS) {