Bug 1287875: Don't try to obtain NS_APP_CONTENT_PROCESS_TEMP_DIR unless MOZ_CONTENT_SANDBOX is defined; r=haik
authorAaron Klotz <aklotz@mozilla.com>
Fri, 29 Jul 2016 12:20:01 -0600
changeset 349462 3a248e721aa179549a8b5a7b78c0ac8fed4603be
parent 349461 8fb07560ca17cb3d4b2483d448e8fa78a9ed7c15
child 349463 3b0313fd4ce642a75a5165180def038e243deb30
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershaik
bugs1287875
milestone50.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 1287875: Don't try to obtain NS_APP_CONTENT_PROCESS_TEMP_DIR unless MOZ_CONTENT_SANDBOX is defined; r=haik MozReview-Commit-ID: Li1I4CtmXvE
ipc/mscom/InterceptorLog.cpp
--- a/ipc/mscom/InterceptorLog.cpp
+++ b/ipc/mscom/InterceptorLog.cpp
@@ -88,18 +88,23 @@ Logger::Logger(const nsACString& aLeafBa
   GeckoProcessType procType = XRE_GetProcessType();
   nsAutoCString leafName(aLeafBaseName);
   nsresult rv;
   if (procType == GeckoProcessType_Default) {
     leafName.AppendLiteral("-Parent-");
     rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(logFileName));
   } else if (procType == GeckoProcessType_Content) {
     leafName.AppendLiteral("-Content-");
+#if defined(MOZ_CONTENT_SANDBOX)
     rv = NS_GetSpecialDirectory(NS_APP_CONTENT_PROCESS_TEMP_DIR,
                                 getter_AddRefs(logFileName));
+#else
+    rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR,
+                                getter_AddRefs(logFileName));
+#endif // defined(MOZ_CONTENT_SANDBOX)
   } else {
     return;
   }
   if (NS_FAILED(rv)) {
     return;
   }
   DWORD pid = GetCurrentProcessId();
   leafName.AppendPrintf("%u.log", pid);