diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 5bdefd13630..9d5d17e171c 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -688,51 +688,6 @@ SetUpSandboxEnvironment() } } -#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 lowIntegrityMozilla; - nsresult rv = NS_GetSpecialDirectory(NS_WIN_LOW_INTEGRITY_TEMP_BASE, - getter_AddRefs(lowIntegrityMozilla)); - if (NS_WARN_IF(NS_FAILED(rv))) { - return; - } - - nsCOMPtr iter; - rv = lowIntegrityMozilla->GetDirectoryEntries(getter_AddRefs(iter)); - if (NS_WARN_IF(NS_FAILED(rv))) { - return; - } - - bool more; - nsCOMPtr elem; - while (NS_SUCCEEDED(iter->HasMoreElements(&more)) && more) { - rv = iter->GetNext(getter_AddRefs(elem)); - if (NS_FAILED(rv)) { - break; - } - - nsCOMPtr file = do_QueryInterface(elem); - if (!file) { - continue; - } - - nsAutoString leafName; - rv = file->GetLeafName(leafName); - if (NS_FAILED(rv)) { - continue; - } - - if (leafName.Find(NS_LITERAL_STRING("MozTemp-{")) == 0) { - file->Remove(/* aRecursive */ true); - } - } -} -#endif - static void CleanUpSandboxEnvironment() { @@ -741,10 +696,6 @@ CleanUpSandboxEnvironment() return; } -#if defined(NIGHTLY_BUILD) - CleanUpOldSandboxEnvironment(); -#endif - // Get temp directory suffix pref. nsAdoptingString tempDirSuffix = Preferences::GetString("security.sandbox.content.tempDirSuffix");