Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/2f8868309af93a15131e3564320760c432f6daae
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/2f8868309af93a15131e3564320760c432f6daae
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/2f8868309af93a15131e3564320760c432f6daae

The branch, master has been updated
       via  2f8868309af93a15131e3564320760c432f6daae (commit)
      from  9232b8fedae8b33e46af08c8ce3eed63363cff34 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=2f8868309af93a15131e3564320760c432f6daae
commit 2f8868309af93a15131e3564320760c432f6daae
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    HTML: Don't transition the content state machine if we do nothing
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/handlers/html/html_script.c 
b/content/handlers/html/html_script.c
index ed73f50..9dad531 100644
--- a/content/handlers/html/html_script.c
+++ b/content/handlers/html/html_script.c
@@ -60,6 +60,7 @@ nserror html_script_exec(html_content *c, bool allow_defer)
        unsigned int i;
        struct html_script *s;
        script_handler_t *script_handler;
+       bool have_run_something = false;
 
        if (c->jscontext == NULL) {
                return NSERROR_BAD_PARAMETER;
@@ -96,6 +97,7 @@ nserror html_script_exec(html_content *c, bool allow_defer)
                                                s->data.handle, &size );
                                script_handler(c->jscontext, data, size,
                                               
nsurl_access(hlcache_handle_get_url(s->data.handle)));
+                               have_run_something = true;
                                /* We have to re-acquire this here since the
                                 * c->scripts array may have been reallocated
                                 * as a result of executing this script.
@@ -108,7 +110,11 @@ nserror html_script_exec(html_content *c, bool allow_defer)
                }
        }
 
-       return html_proceed_to_done(c);
+       if (have_run_something) {
+               return html_proceed_to_done(c);
+       }
+
+       return NSERROR_OK;
 }
 
 /* create new html script entry */


-----------------------------------------------------------------------

Summary of changes:
 content/handlers/html/html_script.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/content/handlers/html/html_script.c 
b/content/handlers/html/html_script.c
index ed73f50..9dad531 100644
--- a/content/handlers/html/html_script.c
+++ b/content/handlers/html/html_script.c
@@ -60,6 +60,7 @@ nserror html_script_exec(html_content *c, bool allow_defer)
        unsigned int i;
        struct html_script *s;
        script_handler_t *script_handler;
+       bool have_run_something = false;
 
        if (c->jscontext == NULL) {
                return NSERROR_BAD_PARAMETER;
@@ -96,6 +97,7 @@ nserror html_script_exec(html_content *c, bool allow_defer)
                                                s->data.handle, &size );
                                script_handler(c->jscontext, data, size,
                                               
nsurl_access(hlcache_handle_get_url(s->data.handle)));
+                               have_run_something = true;
                                /* We have to re-acquire this here since the
                                 * c->scripts array may have been reallocated
                                 * as a result of executing this script.
@@ -108,7 +110,11 @@ nserror html_script_exec(html_content *c, bool allow_defer)
                }
        }
 
-       return html_proceed_to_done(c);
+       if (have_run_something) {
+               return html_proceed_to_done(c);
+       }
+
+       return NSERROR_OK;
 }
 
 /* create new html script entry */


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to