Bug 563737 - [QT] Detect when Qt plugins enter a nested event loop. r=cjones
This commit is contained in:
@@ -39,6 +39,10 @@
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#include <glib.h>
|
||||
#endif
|
||||
#ifdef MOZ_WIDGET_QT
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QEventLoop>
|
||||
#endif
|
||||
|
||||
#include "base/process_util.h"
|
||||
|
||||
@@ -754,7 +758,20 @@ PluginModuleParent::AnswerNPN_GetValue_WithBoolReturn(const NPNVariable& aVariab
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(MOZ_WIDGET_GTK2)
|
||||
#if defined(MOZ_WIDGET_QT)
|
||||
static const int kMaxtimeToProcessEvents = 30;
|
||||
bool
|
||||
PluginModuleParent::AnswerProcessSomeEvents()
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("Spinning mini nested loop ..."));
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, kMaxtimeToProcessEvents);
|
||||
|
||||
PLUGIN_LOG_DEBUG(("... quitting mini nested loop"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#elif !defined(MOZ_WIDGET_GTK2)
|
||||
bool
|
||||
PluginModuleParent::AnswerProcessSomeEvents()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user