diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 05d8ef7ea4db..0887683082dc 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -676,10 +676,26 @@ SetUpSandboxEnvironment() } } -#if defined(NIGHTLY_BUILD) static void -CleanUpOldSandboxEnvironment() +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) // Temporary code to clean up the old low integrity temp directories. // The removal of this is tracked by bug 1165818. nsCOMPtr lowIntegrityMozilla; @@ -718,31 +734,7 @@ CleanUpOldSandboxEnvironment() 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 lowIntegrityTemp = GetAndCleanLowIntegrityTemp(tempDirSuffix); } #endif