mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Bug 1034514 - Record quit-application and profile-before-change in the timeline. r=froydnj
This commit is contained in:
parent
152c74b8e9
commit
94631455e0
@ -19,6 +19,10 @@ mozilla_StartupTimeline_Event(CREATE_TOP_LEVEL_WINDOW, "createTopLevelWindow")
|
||||
mozilla_StartupTimeline_Event(LINKER_INITIALIZED, "linkerInitialized")
|
||||
mozilla_StartupTimeline_Event(LIBRARIES_LOADED, "librariesLoaded")
|
||||
mozilla_StartupTimeline_Event(FIRST_LOAD_URI, "firstLoadURI")
|
||||
|
||||
// The following are actually shutdown events, used to monitor the duration of shutdown
|
||||
mozilla_StartupTimeline_Event(QUIT_APPLICATION, "quitApplication")
|
||||
mozilla_StartupTimeline_Event(PROFILE_BEFORE_CHANGE, "profileBeforeChange")
|
||||
#else
|
||||
|
||||
#ifndef mozilla_StartupTimeline
|
||||
|
@ -161,12 +161,14 @@ nsAppStartup::Init()
|
||||
if (!os)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
os->AddObserver(this, "quit-application", true);
|
||||
os->AddObserver(this, "quit-application-forced", true);
|
||||
os->AddObserver(this, "sessionstore-init-started", true);
|
||||
os->AddObserver(this, "sessionstore-windows-restored", true);
|
||||
os->AddObserver(this, "profile-change-teardown", true);
|
||||
os->AddObserver(this, "xul-window-registered", true);
|
||||
os->AddObserver(this, "xul-window-destroyed", true);
|
||||
os->AddObserver(this, "profile-before-change", true);
|
||||
os->AddObserver(this, "xpcom-shutdown", true);
|
||||
|
||||
#if defined(XP_WIN)
|
||||
@ -721,6 +723,10 @@ nsAppStartup::Observe(nsISupports *aSubject,
|
||||
mXPCOMShutdownProbe->Trigger();
|
||||
}
|
||||
#endif // defined(XP_WIN)
|
||||
} else if (!strcmp(aTopic, "quit-application")) {
|
||||
StartupTimeline::Record(StartupTimeline::QUIT_APPLICATION);
|
||||
} else if (!strcmp(aTopic, "profile-before-change")) {
|
||||
StartupTimeline::Record(StartupTimeline::PROFILE_BEFORE_CHANGE);
|
||||
} else {
|
||||
NS_ERROR("Unexpected observer topic.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user