Monday, 26 November 2012

Error at launch

hi,
last changes seem to have broken NS.
On launch it pops up an "unknown" error.
I traced it to render/html.c:2067 and a mismatched return type, but
there seem to be more to it. The patch below fixes those I found.

François.


diff --git a/render/html.c b/render/html.c
index b5896e1..ededb4c 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1096,7 +1096,7 @@ static bool html_meta_refresh(html_content *c,
dom_node *head)
} else if (dom_string_caseless_lwc_isequal(name,
corestring_lwc_meta)) {
if (html_meta_refresh_process_element(c,
- n) == false) {
+ n) != NSERROR_OK) {
/* Some error occurred */
dom_string_unref(name);
dom_node_unref(n);
@@ -2063,9 +2063,8 @@ html_begin_conversion(html_content *htmlc)
}

/* handle meta refresh */
- ns_error = html_meta_refresh(htmlc, head);
- if (ns_error != NSERROR_OK) {
- content_broadcast_errorcode(&htmlc->base, ns_error);
+ if (html_meta_refresh(htmlc, head) != false) {
+ content_broadcast_errorcode(&htmlc->base, NSERROR_UNKNOWN);

dom_node_unref(html);
dom_node_unref(head);

No comments:

Post a Comment