Bug 1190483 - Followup to address review comment.
authorAndrew McCreight <continuation@gmail.com>
Fri, 14 Aug 2015 10:04:41 -0700
changeset 257890 a8a8b1313b523b721297dcd2e6214260befb8771
parent 257889 4c245c476379f1964db88a3647e0793ffa5de0c5
child 257891 ccfbfd2aeea95fdfd4abb1c7cbd2b2085865a921
push id29233
push userkwierso@gmail.com
push dateFri, 14 Aug 2015 23:32:11 +0000
treeherdermozilla-central@45bea43ad812 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1190483
milestone43.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 1190483 - Followup to address review comment.
xpcom/base/nsTraceRefcnt.cpp
--- a/xpcom/base/nsTraceRefcnt.cpp
+++ b/xpcom/base/nsTraceRefcnt.cpp
@@ -970,16 +970,20 @@ LogDMDFile()
 
   const char* logProcessEnv = PR_GetEnv("MOZ_DMD_LOG_PROCESS");
   if (logProcessEnv && !!strcmp(logProcessEnv, XRE_ChildProcessTypeToString(XRE_GetProcessType()))) {
     return;
   }
 
   nsPrintfCString fileName("%sdmd-%d.log.gz", dmdFilePrefix, base::GetCurrentProcId());
   FILE* logFile = fopen(fileName.get(), "w");
+  if (NS_WARN_IF(!logFile)) {
+    return;
+  }
+
   nsMemoryInfoDumper::DumpDMDToFile(logFile);
 }
 #endif
 
 namespace mozilla {
 void
 LogTerm()
 {