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

View File

@@ -259,6 +259,7 @@ protected:
void InitAsyncSurrogates(); void InitAsyncSurrogates();
protected: protected:
void NotifyFlashHang();
void NotifyPluginCrashed(); void NotifyPluginCrashed();
void OnInitFailure(); void OnInitFailure();