Bug 842262 - Keep ProfD == ProfLD on Android; r=glandium
authorTim Taubert <ttaubert@mozilla.com>
Thu, 28 Feb 2013 22:31:35 +0100
changeset 123610 9f29eaf2b30954040f4517ee989ce80ebe085f3a
parent 123609 a62d6b5fda35a93599f6e818a1251595d23e09e5
child 123611 5fd83591fc2eab4e871f81a4077788bfac25696e
push id24389
push userryanvm@gmail.com
push dateSun, 03 Mar 2013 18:25:34 +0000
treeherdermozilla-central@86c98c4d36da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs842262
milestone22.0a1
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
Bug 842262 - Keep ProfD == ProfLD on Android; r=glandium
toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -1134,16 +1134,20 @@ nsXREDirProvider::GetUserDataDirectoryHo
 #elif defined(MOZ_WIDGET_GONK)
   rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true,
                              getter_AddRefs(localDir));
 #elif defined(XP_UNIX)
   const char* homeDir = getenv("HOME");
   if (!homeDir || !*homeDir)
     return NS_ERROR_FAILURE;
 
+#ifdef ANDROID /* We want (ProfD == ProfLD) on Android. */
+  aLocal = false;
+#endif
+
   if (aLocal) {
     // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache.
     const char* cacheHome = getenv("XDG_CACHE_HOME");
     if (cacheHome && *cacheHome) {
       rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true,
                                  getter_AddRefs(localDir));
     } else {
       rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,