diff options
author | Grant Gayed <grant_gayed@ca.ibm.com> | 2013-06-25 11:46:25 -0400 |
---|---|---|
committer | Grant Gayed <grant_gayed@ca.ibm.com> | 2013-06-25 11:46:25 -0400 |
commit | 76d7d429442fe73692a90b1854cf0455cb3d83fa (patch) | |
tree | 0631aed80051235bfa2541888c10635bacab4e0f /bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt | |
parent | fa0010d4eec5895bc5b20da3f85bd054778613cf (diff) | |
download | eclipse.platform.swt-76d7d429442fe73692a90b1854cf0455cb3d83fa.tar.gz eclipse.platform.swt-76d7d429442fe73692a90b1854cf0455cb3d83fa.tar.xz eclipse.platform.swt-76d7d429442fe73692a90b1854cf0455cb3d83fa.zip |
Bug 400626 - Crash webkitWebViewRegisterForIconNotification
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt')
2 files changed, 33 insertions, 0 deletions
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 f253856721..fa826ecfe9 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 @@ -665,6 +665,17 @@ public void create (Composite parent, int style) { size.x -= minSize.width; size.y -= minSize.height; browser.setSize (size); } + + /* + * WebKitGTK version 1.10.x, and possibly other versions as well, crash + * sporadically in webkitWebViewRegisterForIconNotification(). Work + * around this crash by disabling WebKit's icon database, which is fine + * to do since the Browser does not make use of it in any way. + */ + long /*int*/ database = WebKitGTK.webkit_get_favicon_database (); + if (database != 0) { + WebKitGTK.webkit_favicon_database_set_path (database, 0); + } } void addEventHandlers (long /*int*/ web_view, boolean top) { 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 029041b089..ceac57968b 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 @@ -831,6 +831,17 @@ public static final void webkit_download_start (long /*int*/ download) { } /** @method flags=dynamic */ +public static final native void _webkit_favicon_database_set_path (long /*int*/ database, long /*int*/ path); +public static final void webkit_favicon_database_set_path (long /*int*/ database, long /*int*/ path) { + lock.lock(); + try { + _webkit_favicon_database_set_path (database, path); + } finally { + lock.unlock(); + } +} + +/** @method flags=dynamic */ public static final native long /*int*/ _webkit_get_default_session (); public static final long /*int*/ webkit_get_default_session () { lock.lock(); @@ -842,6 +853,17 @@ public static final long /*int*/ webkit_get_default_session () { } /** @method flags=dynamic */ +public static final native long /*int*/ _webkit_get_favicon_database (); +public static final long /*int*/ webkit_get_favicon_database () { + lock.lock(); + try { + return _webkit_get_favicon_database (); + } finally { + lock.unlock(); + } +} + +/** @method flags=dynamic */ public static final native int _webkit_major_version (); public static final int webkit_major_version () { lock.lock(); |