r5374 jmb - /trunk/hubbub/src/treebuilder/treebuilder.c

netsurf at semichrome.net netsurf at semichrome.net
Thu Sep 18 22:55:51 BST 2008


Author: jmb
Date: Thu Sep 18 16:55:51 2008
New Revision: 5374

URL: http://source.netsurf-browser.org?rev=5374&view=rev
Log:
Ensure we unref collect node if it still exists when we come to destroy the treebuilder (this can occur if EOF is encountered when in generic_rcdata/script_collect modes).
Note that the spec has since changed here, so we'll need to resync, anyway.
This is simply to ensure the testsuite passes once more.

Modified:
    trunk/hubbub/src/treebuilder/treebuilder.c

Modified: trunk/hubbub/src/treebuilder/treebuilder.c
URL: http://source.netsurf-browser.org/trunk/hubbub/src/treebuilder/treebuilder.c?rev=5374&r1=5373&r2=5374&view=diff
==============================================================================
--- trunk/hubbub/src/treebuilder/treebuilder.c (original)
+++ trunk/hubbub/src/treebuilder/treebuilder.c Thu Sep 18 16:55:51 2008
@@ -182,6 +182,12 @@
 					treebuilder->context.document);
 		}
 
+		if (treebuilder->context.collect.node != NULL) {
+			treebuilder->tree_handler->unref_node(
+					treebuilder->tree_handler->ctx,
+					treebuilder->context.collect.node);
+		}
+
 		for (uint32_t n = treebuilder->context.current_node; 
 				n > 0; n--) {
 			treebuilder->tree_handler->unref_node(




More information about the netsurf-commits mailing list