Bug 1172393 - Let XPCOM shutdown properly on Windows versions later than XP - r=mccr8
authorEdwin Flores <edwin@mozilla.com>
Wed, 10 Jun 2015 14:39:05 +1200
changeset 271016 7893f7701e2993aa9959b88943c6bc7c1673e690
parent 271015 bc32a90612e53d180e919521dda9fbf95cba525d
child 271017 1c5e780dc36c5965ba184f8d2f20158157ed49c6
push id2738
push userwcosta@mozilla.com
push dateWed, 10 Jun 2015 13:39:02 +0000
reviewersmccr8
bugs1172393
milestone41.0a1
Bug 1172393 - Let XPCOM shutdown properly on Windows versions later than XP - r=mccr8
xpcom/build/XPCOMInit.cpp
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -88,16 +88,17 @@ extern nsresult nsStringInputStreamConst
 
 #include "nsUUIDGenerator.h"
 
 #include "nsIOUtil.h"
 
 #include "SpecialSystemDirectory.h"
 
 #if defined(XP_WIN)
+#include "mozilla/WindowsVersion.h"
 #include "nsWindowsRegKey.h"
 #endif
 
 #ifdef MOZ_WIDGET_COCOA
 #include "nsMacUtilsImpl.h"
 #endif
 
 #include "nsSystemInfo.h"
@@ -949,17 +950,17 @@ ShutdownXPCOM(nsIServiceManager* aServMg
 #endif
 
 #if defined(XP_WIN)
   // This exit(0) call is intended to be temporary, to get shutdown leak
   // checking working on Linux.
   // On Windows XP debug, there are intermittent failures in
   // dom/media/tests/mochitest/test_peerConnection_basicH264Video.html
   // if we don't exit early in a child process. See bug 1073310.
-  if (XRE_GetProcessType() == GeckoProcessType_Content) {
+  if (XRE_GetProcessType() == GeckoProcessType_Content && !IsVistaOrLater()) {
       NS_WARNING("Exiting child process early!");
       exit(0);
   }
 #endif
 
   // Shutdown xpcom. This will release all loaders and cause others holding
   // a refcount to the component manager to release it.
   if (nsComponentManagerImpl::gComponentManager) {