Bug 1133003 part A - send a global observer notification when Flash hangs, r=aklotz

This commit is contained in:
Benjamin Smedberg
2015-02-19 14:52:04 -05:00
parent 171c3dd461
commit 701b286595
2 changed files with 17 additions and 0 deletions

View File

@@ -897,6 +897,13 @@ CreateFlashMinidump(DWORD processId, ThreadId childThread,
bool
PluginModuleChromeParent::ShouldContinueFromReplyTimeout()
{
if (mIsFlashPlugin) {
MessageLoop::current()->PostTask(
FROM_HERE,
mTaskFactory.NewRunnableMethod(
&PluginModuleChromeParent::NotifyFlashHang));
}
#ifdef XP_WIN
if (LaunchHangUI()) {
return true;
@@ -1279,6 +1286,15 @@ PluginModuleChromeParent::ActorDestroy(ActorDestroyReason why)
PluginModuleParent::ActorDestroy(why);
}
void
PluginModuleParent::NotifyFlashHang()
{
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
if (obs) {
obs->NotifyObservers(nullptr, "flash-plugin-hang", nullptr);
}
}
void
PluginModuleParent::NotifyPluginCrashed()
{