зеркало из https://github.com/mozilla/gecko-dev.git
Bug 763361 - shutdown. sigsegv during freelibrary.
Call RecordShutdownEndTimeStamp from XRE_main. r=benjamin.
This commit is contained in:
Родитель
6edfe17c80
Коммит
9119d7eaa9
|
@ -38,6 +38,8 @@ NS_VISIBILITY_DEFAULT __attribute__((weak));
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
void RecordShutdownEndTimeStamp();
|
||||
|
||||
class StartupTimeline {
|
||||
public:
|
||||
enum Event {
|
||||
|
|
|
@ -285,7 +285,8 @@ RecordShutdownStartTimeStamp() {
|
|||
gRecordedShutdownTimeFileName = PL_strdup(nativePath.get());
|
||||
}
|
||||
|
||||
static void
|
||||
namespace mozilla {
|
||||
void
|
||||
RecordShutdownEndTimeStamp() {
|
||||
if (!gRecordedShutdownTimeFileName)
|
||||
return;
|
||||
|
@ -313,18 +314,7 @@ RecordShutdownEndTimeStamp() {
|
|||
}
|
||||
PR_Rename(tmpName.get(), name.get());
|
||||
}
|
||||
|
||||
// For now firefox runs static destructors during shutdown on release builds
|
||||
// too, so we just use one to run RecordShutdownEndTimeStamp. Once we are
|
||||
// exiting earlier in release builds we just move the call.
|
||||
class RecordShutdownEndTimeStampHelper {
|
||||
public:
|
||||
~RecordShutdownEndTimeStampHelper() {
|
||||
RecordShutdownEndTimeStamp();
|
||||
}
|
||||
};
|
||||
|
||||
static RecordShutdownEndTimeStampHelper gHelper;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAppStartup::Quit(uint32_t aMode)
|
||||
|
|
|
@ -3937,7 +3937,9 @@ int
|
|||
XRE_main(int argc, char* argv[], const nsXREAppData* aAppData, PRUint32 aFlags)
|
||||
{
|
||||
XREMain main;
|
||||
return main.XRE_main(argc, argv, aAppData);
|
||||
int result = main.XRE_main(argc, argv, aAppData);
|
||||
mozilla::RecordShutdownEndTimeStamp();
|
||||
return result;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
Загрузка…
Ссылка в новой задаче