Bug 1137609: Apply the XPSP2 patch on all XP because we can't trust the version. r=glandium
☠☠ backed out by b7cdf1cf0939 ☠ ☠
authorDavid Major <dmajor@mozilla.com>
Tue, 03 Mar 2015 18:02:17 +1300
changeset 246929 d46dcd6bc7e7d66e407e4b4de8b5a2e452da3922
parent 246928 655ddeba3c94b011be1816855d3984e1170346e8
child 246930 08e06ab7702a5455fd110e4213a7a6a3ce115ca9
push id884
push userdburns@mozilla.com
push dateTue, 03 Mar 2015 15:29:12 +0000
reviewersglandium
bugs1137609
milestone39.0a1
Bug 1137609: Apply the XPSP2 patch on all XP because we can't trust the version. r=glandium
toolkit/xre/WindowsCrtPatch.h
--- a/toolkit/xre/WindowsCrtPatch.h
+++ b/toolkit/xre/WindowsCrtPatch.h
@@ -123,17 +123,18 @@ Init()
   //
   // If these assertions fail, see the comment at the top of this file for
   // possible causes. Any changes to the lines below MUST be tested on XP SP2!
   MOZ_ASSERT(!GetModuleHandleA("mozglue.dll"));
   MOZ_ASSERT(!GetModuleHandleA("msvcr120.dll"));
   MOZ_ASSERT(!GetModuleHandleA("msvcr120d.dll"));
 
 #if defined(_M_IX86) && defined(_MSC_VER)
-  if (!mozilla::IsXPSP3OrLater()) {
+  // Add the hook on all XP because we can't trust the SP version (bug 1137609)
+  if (!mozilla::IsWin2003OrLater()) {
     NtdllIntercept.Init("ntdll.dll");
     NtdllIntercept.AddHook("RtlImageNtHeader",
                            reinterpret_cast<intptr_t>(patched_RtlImageNtHeader),
                            reinterpret_cast<void**>(&stub_RtlImageNtHeader));
   }
 #endif
 }