Bug 788512 - Repost CleanupFromTimeout if it can't currently be processed. r=bsmedberg

--HG--
extra : rebase_source : 0a7e7a65df1448b7337a3bf5e549f29a2eccd5d4
This commit is contained in:
Georg Fritzsche 2012-10-15 12:29:47 +02:00
parent 474de51db5
commit 94cf6a98f4

View File

@ -217,8 +217,20 @@ PluginModuleParent::TimeoutChanged(const char* aPref, void* aModule)
void
PluginModuleParent::CleanupFromTimeout()
{
if (!mShutdown && OkToCleanup())
Close();
if (mShutdown) {
return;
}
if (!OkToCleanup()) {
// there's still plugin code on the C++ stack, try again
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
mTaskFactory.NewRunnableMethod(
&PluginModuleParent::CleanupFromTimeout), 10);
return;
}
Close();
}
#ifdef XP_WIN