зеркало из https://github.com/mozilla/gecko-dev.git
about:startup - record timestamp early on in the XRE setup
This commit is contained in:
Родитель
eec2b0ffce
Коммит
28aeba0141
|
@ -72,6 +72,10 @@ ScopedAppData::ScopedAppData(const nsXREAppData* aAppData)
|
|||
|
||||
this->size = aAppData->size;
|
||||
|
||||
if (aAppData->size > offsetof(nsXREAppData, startupTimestamp)) {
|
||||
this->startupTimestamp = PR_IntervalNow();
|
||||
}
|
||||
|
||||
SetAllocatedString(this->vendor, aAppData->vendor);
|
||||
SetAllocatedString(this->name, aAppData->name);
|
||||
SetAllocatedString(this->version, aAppData->version);
|
||||
|
|
|
@ -805,6 +805,21 @@ nsXULAppInfo::InvalidateCachesOnRestart()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long launchTimestamp; */
|
||||
NS_IMETHODIMP nsXULAppInfo::GetLaunchTimestamp(PRUint32 *aTimestamp)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long startupTimestamp; */
|
||||
NS_IMETHODIMP nsXULAppInfo::GetStartupTimestamp(PRUint32 *aTimestamp)
|
||||
{
|
||||
*aTimestamp = gAppData->startupTimestamp;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef XP_WIN
|
||||
// Matches the enum in WinNT.h for the Vista SDK but renamed so that we can
|
||||
// safely build with the Vista SDK and without it.
|
||||
|
|
|
@ -151,6 +151,11 @@ struct nsXREAppData
|
|||
* UAppData = $HOME/$profile
|
||||
*/
|
||||
const char *profile;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PRIntervalTime startupTimestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -107,4 +107,7 @@ interface nsIXULRuntime : nsISupports
|
|||
* fastload data to be re-created.
|
||||
*/
|
||||
void invalidateCachesOnRestart();
|
||||
|
||||
readonly attribute unsigned long launchTimestamp;
|
||||
readonly attribute unsigned long startupTimestamp;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче