[epiphany] web-view: Ensure reader_js_timeout is not left "dangling"



commit 6cf73b8be6fc50cb4c603dd3305d01d9f7dbd618
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Oct 10 09:16:08 2018 -0500

    web-view: Ensure reader_js_timeout is not left "dangling"
    
    Dangling isn't quite the right word, since it's not a pointer, but
    conceptually a source ID pointing to a source that no longer exists is
    the same style bug.

 embed/ephy-web-view.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 3ffb61e83..f18b8acf0 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -999,7 +999,6 @@ run_readability_js_if_needed (gpointer data)
 
   /* Internal pages should never receive reader mode. */
   if (!ephy_embed_utils_is_no_show_address (web_view->address)) {
-    web_view->reader_js_timeout = 0;
     webkit_web_view_run_javascript_from_gresource (WEBKIT_WEB_VIEW (web_view),
                                                    "/org/gnome/epiphany/readability.js",
                                                    NULL,
@@ -1007,6 +1006,7 @@ run_readability_js_if_needed (gpointer data)
                                                    web_view);
   }
 
+  web_view->reader_js_timeout = 0;
   return G_SOURCE_REMOVE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]