Blob Blame History Raw
diff --git eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index 7ef6236..5d434fe 100644
--- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java	
+++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java	
@@ -135,6 +135,23 @@ class WebKit extends WebBrowser {
 			String webkit2 = System.getenv("SWT_WEBKIT2"); // $NON-NLS-1$
 			WEBKIT2 = webkit2 != null && webkit2.equals("1") && OS.GTK3; // $NON-NLS-1$
 
+			/*
+			 * WebKitGTK version 1.8.x and newer can crash sporadically in
+			 * webkitWebViewRegisterForIconNotification().  The root issue appears
+			 * to be WebKitGTK accessing its icon database from a background
+			 * thread.  Work around this crash by disabling the use of WebKitGTK's
+			 * icon database, which should not affect the Browser in any way.
+			 */
+			if (WEBKIT2){
+			    WebKitGTK.webkit_web_context_set_favicon_database_directory(WebKitGTK.webkit_web_context_get_default(), 0);
+			} else {
+			    long /*int*/ database = WebKitGTK.webkit_get_favicon_database ();
+			    if (database != 0) {
+				/* WebKitGTK version is >= 1.8.x */
+				WebKitGTK.webkit_favicon_database_set_path (database, 0);
+			    }
+			}
+
 			WebViewType = WebKitGTK.webkit_web_view_get_type ();
 
 			Proc2 = new Callback (WebKit.class, "Proc", 2); //$NON-NLS-1$
@@ -604,22 +621,6 @@ public void create (Composite parent, int style) {
 		PostString = C.malloc (bytes.length);
 		C.memmove (PostString, bytes, bytes.length);
 
-		/*
-		* WebKitGTK version 1.8.x and newer can crash sporadically in
-		* webkitWebViewRegisterForIconNotification().  The root issue appears
-		* to be WebKitGTK accessing its icon database from a background
-		* thread.  Work around this crash by disabling the use of WebKitGTK's
-		* icon database, which should not affect the Browser in any way.
-		*/
-		if (WEBKIT2){
-			WebKitGTK.webkit_web_context_set_favicon_database_directory(WebKitGTK.webkit_web_context_get_default(), 0);
-		} else {
-			long /*int*/ database = WebKitGTK.webkit_get_favicon_database ();
-			if (database != 0) {
-				/* WebKitGTK version is >= 1.8.x */
-				WebKitGTK.webkit_favicon_database_set_path (database, 0);
-			}
-		}
 	}
 
 	if (!WEBKIT2){