# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1575277228 0 # Node ID 026f033ac1c1d2f4fe506bb31c83b07c9f570d19 # Parent cfa0a9554118b8481c59246dcf72c8537408e127 GTK3: User and Script data parameters to HTML_RESULT handler were swapped. diff -r cfa0a9554118 -r 026f033ac1c1 gtk3/dw.c --- a/gtk3/dw.c Mon Dec 02 03:49:09 2019 +0000 +++ b/gtk3/dw.c Mon Dec 02 09:00:28 2019 +0000 @@ -1199,8 +1199,8 @@ static void _html_result_event(GObject *object, GAsyncResult *result, gpointer script_data) { +#if USE_WEBKIT2 pthread_t saved_thread = _dw_thread; -#if USE_WEBKIT2 WebKitJavascriptResult *js_result; #if WEBKIT_CHECK_VERSION(2, 22, 0) JSCValue *value; @@ -1231,7 +1231,7 @@ if(!(js_result = webkit_web_view_run_javascript_finish(WEBKIT_WEB_VIEW(object), result, &error))) { if(htmlresultfunc) - htmlresultfunc((HWND)object, DW_ERROR_UNKNOWN, error->message, user_data, script_data); + htmlresultfunc((HWND)object, DW_ERROR_UNKNOWN, error->message, script_data, user_data); g_error_free (error); _dw_thread = saved_thread; return; @@ -1263,18 +1263,18 @@ { #if WEBKIT_CHECK_VERSION(2, 22, 0) if(exception) - htmlresultfunc((HWND)object, DW_ERROR_UNKNOWN, (char *)jsc_exception_get_message(exception), user_data, script_data); + htmlresultfunc((HWND)object, DW_ERROR_UNKNOWN, (char *)jsc_exception_get_message(exception), script_data, user_data); else #endif - htmlresultfunc((HWND)object, DW_ERROR_NONE, str_value, user_data, script_data); + htmlresultfunc((HWND)object, DW_ERROR_NONE, str_value, script_data, user_data); } g_free (str_value); } else if(htmlresultfunc) - htmlresultfunc((HWND)object, DW_ERROR_UNKNOWN, NULL, user_data, script_data); + htmlresultfunc((HWND)object, DW_ERROR_UNKNOWN, NULL, script_data, user_data); webkit_javascript_result_unref (js_result); -#endif _dw_thread = saved_thread; +#endif } #ifdef USE_WEBKIT