From b5d229937e31e9cec6cf599ae816e22888237aa0 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 2 Feb 2006 22:25:18 +0000 Subject: Helper class that pushes a null JS context on the stack, and pops it in 2006-02-02 Christian Persch * embed/mozilla/Makefile.am: * embed/mozilla/AutoJSContextStack.cpp: * embed/mozilla/AutoJSContextStack.h: Helper class that pushes a null JS context on the stack, and pops it in the destructor. * embed/mozilla/ContentHandler.cpp: * embed/mozilla/EphyPromptService.cpp: * embed/mozilla/FilePicker.cpp: * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSDialogs.cpp: * embed/mozilla/GtkNSSKeyPairDialogs.cpp: * embed/mozilla/GtkNSSSecurityWarningDialogs.cpp: * embed/mozilla/PrintingPromptService.cpp: Push a null JS context on the stack when we run a recursive mainloop. Fixes the epiphany equivalend of camino bug https://bugzilla.mozilla.org/show_bug.cgi?id=179307. --- embed/mozilla/GtkNSSClientAuthDialogs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'embed/mozilla/GtkNSSClientAuthDialogs.cpp') diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp index ae88a6b25..b5169823b 100644 --- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp +++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp @@ -25,6 +25,7 @@ #include "config.h" #include "EphyUtils.h" +#include "AutoJSContextStack.h" #include #include @@ -145,6 +146,11 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx, char *msg, *markup_text; PRUint32 i; + nsresult rv; + AutoJSContextStack stack; + rv = stack.Init (); + if (NS_FAILED (rv)) return rv; + nsCOMPtr parent = do_GetInterface (ctx); GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent)); -- cgit v1.2.3