Bug 1145782: Add crash reporter annotations for async plugin init to parent and child processes; r=jimm

--HG--
extra : rebase_source : 8680b5577f8052c30c22eaa31ad34d4b92286fe5
This commit is contained in:
Aaron Klotz 2015-03-23 22:01:07 -06:00
Родитель f719fc245a
Коммит 41e0657ba2
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -537,6 +537,13 @@ PluginModuleChromeParent::OnProcessLaunched(const bool aSucceeded)
OnInitFailure();
return;
}
CrashReporterParent* crashReporter = CrashReporter();
if (crashReporter) {
crashReporter->AnnotateCrashReport(NS_LITERAL_CSTRING("AsyncPluginInit"),
mIsStartingAsync ?
NS_LITERAL_CSTRING("1") :
NS_LITERAL_CSTRING("0"));
}
#ifdef XP_WIN
{ // Scope for lock
mozilla::MutexAutoLock lock(mCrashReporterMutex);
@ -607,6 +614,12 @@ PluginModuleParent::PluginModuleParent(bool aIsChrome)
{
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
mIsStartingAsync = Preferences::GetBool(kAsyncInitPref, false);
#if defined(MOZ_CRASHREPORTER)
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("AsyncPluginInit"),
mIsStartingAsync ?
NS_LITERAL_CSTRING("1") :
NS_LITERAL_CSTRING("0"));
#endif
#endif
}