aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/ContentHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r--embed/mozilla/ContentHandler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index e7d7ca885..6c3acd696 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "ContentHandler.h"
+#include "AutoJSContextStack.h"
#include <gtk/gtkdialog.h>
#include <gtk/gtkmessagedialog.h>
@@ -166,6 +167,11 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
return BuildDownloadPath (defaultFile.get(), _retval);
}
+ nsresult rv;
+ AutoJSContextStack stack;
+ rv = stack.Init ();
+ if (NS_FAILED (rv)) return rv;
+
nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_GetInterface (aWindowContext);
GtkWidget *parentWindow = GTK_WIDGET (EphyUtils::FindGtkParent (parentDOMWindow));