bug 408729 - annotate crash report with StartupTime. r=mento
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -412,16 +412,22 @@ nsresult SetExceptionHandler(nsILocalFil
if (!gExceptionHandler)
return NS_ERROR_OUT_OF_MEMORY;
// store server URL with the API data
if (aServerURL)
AnnotateCrashReport(NS_LITERAL_CSTRING("ServerURL"),
nsDependentCString(aServerURL));
+ // store application start time
+ nsCAutoString timeString;
+ timeString.AppendInt(time(NULL));
+ AnnotateCrashReport(NS_LITERAL_CSTRING("StartupTime"),
+ timeString);
+
#if defined(XP_MACOSX)
// On OS X, many testers like to see the OS crash reporting dialog
// since it offers immediate stack traces. We allow them to set
// a default to pass exceptions to the OS handler.
showOSCrashReporter = PassToOSCrashReporter();
#endif
return NS_OK;