about:startup - handle a failure from nsIXULRuntime::GetLaunchTimestamp properly

This commit is contained in:
Daniel Brooks 2010-09-26 06:35:58 -04:00
parent 45773d35d8
commit 02b60edd7f

View File

@ -536,7 +536,7 @@ nsAppStartup::Observe(nsISupports *aSubject,
nsresult nsAppStartup::RecordStartupDuration()
{
nsresult rv;
PRTime launched, started;
PRTime launched = 0, started = 0;
mRestoredTimestamp = PR_Now();
nsCOMPtr<mozIStorageConnection> db;
@ -554,6 +554,9 @@ nsresult nsAppStartup::RecordStartupDuration()
runtime->GetLaunchTimestamp((PRUint64*)&launched);
runtime->GetStartupTimestamp((PRUint64*)&started);
if (!launched)
launched = started;
nsCAutoString appVersion, appBuild, platformVersion, platformBuild;
appinfo->GetVersion(appVersion);
appinfo->GetAppBuildID(appBuild);