aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/GtkNSSSecurityWarningDialogs.cpp')
-rw-r--r--embed/mozilla/GtkNSSSecurityWarningDialogs.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp b/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp
index faec73741..1caa3e415 100644
--- a/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp
+++ b/embed/mozilla/GtkNSSSecurityWarningDialogs.cpp
@@ -47,6 +47,7 @@
#include "GtkNSSSecurityWarningDialogs.h"
#include "EphyUtils.h"
+#include "AutoEventQueue.h"
#include <nsCOMPtr.h>
#include <nsIPrefBranch.h>
@@ -200,6 +201,12 @@ GtkNSSSecurityWarningDialogs::DoDialog (nsIInterfaceRequestor *aContext,
{
*_retval = PR_FALSE;
+ /* Work around this broken API by pushing a new event queue. Otherwise
+ * networking will block while the dialogue is shown!
+ */
+ AutoEventQueue queue;
+ if (NS_FAILED (queue.Init ())) return;
+
nsresult rv;
PRBool show = PR_TRUE;
nsCOMPtr<nsIPrefBranch> prefBranch