Bug 903386 - Make all delayed PluginModuleParent tasks revocable. r=aklotz

This commit is contained in:
Georg Fritzsche
2013-09-23 19:34:00 +02:00
parent 80b6463437
commit fc7e5a73ea
4 changed files with 94 additions and 14 deletions

View File

@@ -493,19 +493,10 @@ PluginModuleParent::TerminateChildProcess(MessageLoop* aMsgLoop)
// this must run before the error notification from the channel,
// or not at all
bool isFromHangUI = aMsgLoop != MessageLoop::current();
if (isFromHangUI) {
// If we're posting from a different thread we can't create
// the task via mTaskFactory
aMsgLoop->PostTask(FROM_HERE,
NewRunnableMethod(this,
&PluginModuleParent::CleanupFromTimeout,
isFromHangUI));
} else {
aMsgLoop->PostTask(
FROM_HERE,
mTaskFactory.NewRunnableMethod(
&PluginModuleParent::CleanupFromTimeout, isFromHangUI));
}
aMsgLoop->PostTask(
FROM_HERE,
mTaskFactory.NewRunnableMethod(
&PluginModuleParent::CleanupFromTimeout, isFromHangUI));
if (!KillProcess(OtherProcess(), 1, false))
NS_WARNING("failed to kill subprocess!");