Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/hulahop-web-view.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hulahop-web-view.cpp')
-rw-r--r--src/hulahop-web-view.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/hulahop-web-view.cpp b/src/hulahop-web-view.cpp
index 2eeebc6..286f3cf 100644
--- a/src/hulahop-web-view.cpp
+++ b/src/hulahop-web-view.cpp
@@ -28,6 +28,8 @@
#include <nsIDOMEventTarget.h>
#include <nsIBaseWindow.h>
#include <nsIInterfaceRequestorUtils.h>
+#include <jscntxt.h>
+#include <nsIJSContextStack.h>
#include <PyXPCOM.h>
#include <gtk/gtkfixed.h>
@@ -294,3 +296,20 @@ hulahop_web_view_grab_focus(HulahopWebView *web_view)
gtk_widget_grab_focus(web_view->mozilla_widget);
}
}
+
+void
+hulahop_web_view_push_js_context (HulahopWebView *web_view)
+{
+ nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1"));
+ nsresult rv = stack->Push(nsnull);
+ g_assert(NS_SUCCEEDED(rv));
+}
+
+void
+hulahop_web_view_pop_js_context (HulahopWebView *web_view)
+{
+ nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1"));
+ nsresult rv = stack->Pop(nsnull);
+ g_assert(NS_SUCCEEDED(rv));
+}
+