r3535 jmb - /trunk/netsurf/riscos/url_complete.c

netsurf at semichrome.net netsurf at semichrome.net
Wed Aug 29 01:27:53 BST 2007


Author: jmb
Date: Wed Aug 29 01:27:52 2007
New Revision: 3535

URL: http://source.netsurf-browser.org?rev=3535&view=rev
Log:
Probably fix crash on clicking in url completion dialogue.
URL completion really needs revisiting, as it's full of side effects and has weird and wonderful interactions with other parts of the system.

Modified:
    trunk/netsurf/riscos/url_complete.c

Modified: trunk/netsurf/riscos/url_complete.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/url_complete.c?rev=3535&r1=3534&r2=3535&view=diff
==============================================================================
--- trunk/netsurf/riscos/url_complete.c (original)
+++ trunk/netsurf/riscos/url_complete.c Wed Aug 29 01:27:52 2007
@@ -720,12 +720,22 @@
 				ICON_TOOLBAR_URL,
 				url_complete_matches[
 					url_complete_matches_selection]);
-		browser_window_go(g->bw,
+		global_history_add_recent(url_complete_matches[
+					url_complete_matches_selection]);
+
+		/** \todo The interaction of components here is hideous */
+		/* Do NOT make any attempt to use any of the global url
+		 * completion variables after this call to browser_window_go.
+		 * They will be invalidated by (at least):
+		 *   + gui_window_set_url
+		 *   + destruction of (i)frames within the current page 
+		 * Any attempt to use them will probably result in a crash.
+		 */
+
+		 browser_window_go(g->bw,
 				url_complete_matches[
 					url_complete_matches_selection],
 				0, true);
-		global_history_add_recent(url_complete_matches[
-					url_complete_matches_selection]);
 		ro_gui_url_complete_close(NULL, 0);
 
 	/* Adjust just sets the text */





More information about the netsurf-commits mailing list