Backed out changeset 31662149dab4 (bug 1167083) for T(x) failures on a CLOSED TREE
authorBob Owen <bobowencode@gmail.com>
Fri, 22 May 2015 12:51:18 +0100
changeset 266240 228109b9b9abe37d11f714aa8307011f0a47c3df
parent 266239 bee4bdb3624cc286895f534872ce89a84abb98b3
child 266241 ef2faa9a0845639b95316fdc8c50c9c2a827334e
push id2231
push usermichael.l.comella@gmail.com
push dateFri, 22 May 2015 20:04:59 +0000
bugs1167083
milestone41.0a1
backs out31662149dab4c44d35ed27ddd16c91ef32c8d745
Backed out changeset 31662149dab4 (bug 1167083) for T(x) failures on a CLOSED TREE
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -671,20 +671,36 @@ SetUpSandboxEnvironment()
   }
 
   rv = lowIntegrityTemp->Create(nsIFile::DIRECTORY_TYPE, 0700);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
 }
 
+static void
+CleanUpSandboxEnvironment()
+{
+  // We can't have created a low integrity temp before Vista.
+  if (!IsVistaOrLater()) {
+    return;
+  }
+
+  // Get temp directory suffix pref.
+  nsAdoptingString tempDirSuffix =
+    Preferences::GetString("security.sandbox.content.tempDirSuffix");
+  if (tempDirSuffix.IsEmpty()) {
+    return;
+  }
+
+  // Get and remove the low integrity Mozilla temp directory.
+  // This function already warns if the deletion fails.
+  unused << GetAndCleanLowIntegrityTemp(tempDirSuffix);
+
 #if defined(NIGHTLY_BUILD)
-static void
-CleanUpOldSandboxEnvironment()
-{
   // Temporary code to clean up the old low integrity temp directories.
   // The removal of this is tracked by bug 1165818.
   nsCOMPtr<nsIFile> lowIntegrityMozilla;
   nsresult rv = NS_GetSpecialDirectory(NS_WIN_LOW_INTEGRITY_TEMP_BASE,
                               getter_AddRefs(lowIntegrityMozilla));
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
@@ -713,41 +729,17 @@ CleanUpOldSandboxEnvironment()
     if (NS_FAILED(rv)) {
       continue;
     }
 
     if (leafName.Find(NS_LITERAL_STRING("MozTemp-{")) == 0) {
       file->Remove(/* aRecursive */ true);
     }
   }
-}
 #endif
-
-static void
-CleanUpSandboxEnvironment()
-{
-  // We can't have created a low integrity temp before Vista.
-  if (!IsVistaOrLater()) {
-    return;
-  }
-
-#if defined(NIGHTLY_BUILD)
-  CleanUpOldSandboxEnvironment();
-#endif
-
-  // Get temp directory suffix pref.
-  nsAdoptingString tempDirSuffix =
-    Preferences::GetString("security.sandbox.content.tempDirSuffix");
-  if (tempDirSuffix.IsEmpty()) {
-    return;
-  }
-
-  // Get and remove the low integrity Mozilla temp directory.
-  // This function already warns if the deletion fails.
-  nsCOMPtr<nsIFile> lowIntegrityTemp = GetAndCleanLowIntegrityTemp(tempDirSuffix);
 }
 #endif
 
 bool gSafeMode = false;
 
 /**
  * The nsXULAppInfo object implements nsIFactory so that it can be its own
  * singleton.