crash reporter client not launching, fallout from bug 380541. r=bsmedberg (no bug)
authorted.mielczarek@gmail.com
Tue, 24 Jul 2007 18:06:05 -0700
changeset 3893 c601cd1620a8f90ceccc9d1c7cbac919fc5d0750
parent 3892 526fa40af3bd626972ef983d3c00df6c4b89a19f
child 3894 411419a5b5075e66575cab1aefa4b54bc96ca072
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs380541
milestone1.9a7pre
crash reporter client not launching, fallout from bug 380541. r=bsmedberg (no bug)
toolkit/crashreporter/nsExceptionHandler.cpp
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -240,22 +240,26 @@ nsresult SetExceptionHandler(nsILocalFil
   crashReporterAPIData_Hash =
     new nsDataHashtable<nsCStringHashKey,nsCString>();
   NS_ENSURE_TRUE(crashReporterAPIData_Hash, NS_ERROR_OUT_OF_MEMORY);
 
   rv = crashReporterAPIData_Hash->Init();
   NS_ENSURE_SUCCESS(rv, rv);
 
   // locate crashreporter executable
-  nsString exePath;
+  nsCOMPtr<nsIFile> exePath;
+  rv = aXREDirectory->Clone(getter_AddRefs(exePath));
+  NS_ENSURE_SUCCESS(rv, rv);
 
-  aXREDirectory->GetPath(exePath);
-  NS_NAMED_LITERAL_STRING(crashReporterFilename, CRASH_REPORTER_FILENAME);
+  exePath->Append(NS_LITERAL_STRING(CRASH_REPORTER_FILENAME));
 
-  crashReporterPath = TO_NEW_XP_CHAR(exePath + crashReporterFilename);
+  nsString crashReporterPath_temp;
+  exePath->GetPath(crashReporterPath_temp);
+
+  crashReporterPath = TO_NEW_XP_CHAR(crashReporterPath_temp);
 
   // get temp path to use for minidump path
   nsString tempPath;
 #if defined(XP_WIN32)
   // first figure out buffer size
   int pathLen = GetTempPath(0, NULL);
   if (pathLen == 0)
     return NS_ERROR_FAILURE;