Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java13
5 files changed, 32 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
index 3ce68d9355..00bef3dce5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -481,6 +481,16 @@ JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1auth_1get_1scheme_1name)
}
#endif
+#ifndef NO__1soup_1cookie_1free
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1free)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1free_FUNC);
+ soup_cookie_free((SoupCookie *)arg0);
+ WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1free_FUNC);
+}
+#endif
+
#ifndef NO__1soup_1cookie_1jar_1add_1cookie
JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1add_1cookie)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
index 31b101d3e1..15305a44c7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int WebKitGTK_nativeFunctionCount = 97;
-int WebKitGTK_nativeFunctionCallCount[97];
+int WebKitGTK_nativeFunctionCount = 98;
+int WebKitGTK_nativeFunctionCallCount[98];
char * WebKitGTK_nativeFunctionNames[] = {
"JSClassDefinition_1sizeof",
"_1JSClassCreate",
@@ -56,6 +56,7 @@ char * WebKitGTK_nativeFunctionNames[] = {
"_1soup_1auth_1authenticate",
"_1soup_1auth_1get_1host",
"_1soup_1auth_1get_1scheme_1name",
+ "_1soup_1cookie_1free",
"_1soup_1cookie_1jar_1add_1cookie",
"_1soup_1cookie_1jar_1all_1cookies",
"_1soup_1cookie_1jar_1delete_1cookie",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
index 69398a9b36..917e466a27 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -64,6 +64,7 @@ typedef enum {
_1soup_1auth_1authenticate_FUNC,
_1soup_1auth_1get_1host_FUNC,
_1soup_1auth_1get_1scheme_1name_FUNC,
+ _1soup_1cookie_1free_FUNC,
_1soup_1cookie_1jar_1add_1cookie_FUNC,
_1soup_1cookie_1jar_1all_1cookies_FUNC,
_1soup_1cookie_1jar_1delete_1cookie_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index 727a9ed451..5572bcd49e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
@@ -140,9 +140,10 @@ class WebKit extends WebBrowser {
/* indicates a session cookie */
WebKitGTK.soup_cookie_jar_delete_cookie (jar, cookie);
}
- OS.g_free (cookie);
+ WebKitGTK.soup_cookie_free (cookie);
current = OS.g_slist_next (current);
}
+ OS.g_slist_free (cookies);
}
};
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
index 01bbe98be5..9c01d77046 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
@@ -484,6 +484,19 @@ public static final int /*long*/ soup_auth_get_scheme_name (int /*long*/ auth) {
}
/**
+ * @param cookie cast=(SoupCookie *)
+ */
+public static final native void _soup_cookie_free (int /*long*/ cookie);
+public static final void soup_cookie_free (int /*long*/ cookie) {
+ lock.lock();
+ try {
+ _soup_cookie_free (cookie);
+ } finally {
+ lock.unlock();
+ }
+}
+
+/**
* @param jar cast=(SoupCookieJar *)
* @param cookie cast=(SoupCookie *)
*/

Back to the top