Backout 60752371afbb (bug 1364984) for causing bc failures. r=me
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Thu, 01 Jun 2017 17:04:12 -0400
changeset 361911 130dc8355e27d6161af44fb2e0e65212f75bd730
parent 361910 40b3da698ff5f463f4374b7178943124f1851512
child 361912 1e229cf8933b08191e4243a6b9dbb3c821db60ab
child 361976 9f6c73141311dd0c4d5ad140ab056d77ef2956ab
push id31948
push userkwierso@gmail.com
push dateFri, 02 Jun 2017 00:27:01 +0000
treeherdermozilla-central@1e229cf8933b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1364984
milestone55.0a1
backs out60752371afbb6a9e0631c55ea09a05c0d767d04b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout 60752371afbb (bug 1364984) for causing bc failures. r=me
xpcom/io/CocoaFileUtils.h
xpcom/io/CocoaFileUtils.mm
xpcom/io/SpecialSystemDirectory.cpp
--- a/xpcom/io/CocoaFileUtils.h
+++ b/xpcom/io/CocoaFileUtils.h
@@ -23,13 +23,12 @@ nsresult GetFileTypeCode(CFURLRef aUrl, 
 nsresult SetFileTypeCode(CFURLRef aUrl, OSType aTypeCode);
 void     AddOriginMetadataToFile(const CFStringRef filePath,
                                  const CFURLRef sourceURL,
                                  const CFURLRef referrerURL);
 void     AddQuarantineMetadataToFile(const CFStringRef filePath,
                                      const CFURLRef sourceURL,
                                      const CFURLRef referrerURL,
                                      const bool isFromWeb);
-CFURLRef GetTemporaryFolderCFURLRef();
 
 } // namespace CocoaFileUtils
 
 #endif
--- a/xpcom/io/CocoaFileUtils.mm
+++ b/xpcom/io/CocoaFileUtils.mm
@@ -252,16 +252,9 @@ void AddQuarantineMetadataToFile(const C
                                    quarantinePropKey,
                                    mutQuarantineProps,
                                    NULL);
 
   ::CFRelease(fileURL);
   ::CFRelease(mutQuarantineProps);
 }
 
-CFURLRef GetTemporaryFolderCFURLRef()
-{
-  NSString* tempDir = ::NSTemporaryDirectory();
-  return tempDir == nil ? NULL : (CFURLRef)[NSURL fileURLWithPath:tempDir
-                                                      isDirectory:YES];
-}
-
 } // namespace CocoaFileUtils
--- a/xpcom/io/SpecialSystemDirectory.cpp
+++ b/xpcom/io/SpecialSystemDirectory.cpp
@@ -22,19 +22,16 @@
 
 #elif defined(XP_UNIX)
 
 #include <limits.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/param.h>
 #include "prenv.h"
-#if defined(MOZ_WIDGET_COCOA)
-#include "CocoaFileUtils.h"
-#endif
 
 #endif
 
 #ifndef MAXPATHLEN
 #ifdef PATH_MAX
 #define MAXPATHLEN PATH_MAX
 #elif defined(MAX_PATH)
 #define MAXPATHLEN MAX_PATH
@@ -764,30 +761,20 @@ GetSpecialSystemDirectory(SystemDirector
   }
   return NS_ERROR_NOT_AVAILABLE;
 }
 
 #if defined (MOZ_WIDGET_COCOA)
 nsresult
 GetOSXFolderType(short aDomain, OSType aFolderType, nsIFile** aLocalFile)
 {
+  OSErr err;
+  FSRef fsRef;
   nsresult rv = NS_ERROR_FAILURE;
 
-  if (aFolderType == kTemporaryFolderType) {
-    NS_NewLocalFile(EmptyString(), true, aLocalFile);
-    nsCOMPtr<nsILocalFileMac> localMacFile(do_QueryInterface(*aLocalFile));
-    if (localMacFile) {
-      rv = localMacFile->InitWithCFURL(
-             CocoaFileUtils::GetTemporaryFolderCFURLRef());
-    }
-    return rv;
-  }
-
-  OSErr err;
-  FSRef fsRef;
   err = ::FSFindFolder(aDomain, aFolderType, kCreateFolder, &fsRef);
   if (err == noErr) {
     NS_NewLocalFile(EmptyString(), true, aLocalFile);
     nsCOMPtr<nsILocalFileMac> localMacFile(do_QueryInterface(*aLocalFile));
     if (localMacFile) {
       rv = localMacFile->InitWithFSRef(&fsRef);
     }
   }