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 332426 3a248e721aa179549a8b5a7b78c0ac8fed4603be
parent 332425 8fb07560ca17cb3d4b2483d448e8fa78a9ed7c15
child 332427 3b0313fd4ce642a75a5165180def038e243deb30
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershaik
bugs1287875
milestone50.0a1
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);