Title: [232009] trunk/Tools
Revision
232009
Author
carlo...@webkit.org
Date
2018-05-20 23:24:52 -0700 (Sun, 20 May 2018)

Log Message

[GTK] MiniBrowser crashes when loading twice quickly
https://bugs.webkit.org/show_bug.cgi?id=185763

Reviewed by Michael Catanzaro.

This is very difficult to reproduce manually, but it happens when running WebDriver tests where loads are very
fast and multiple loads are done quickly. The problem is that we use an idle to reset the progress bar, but we
don't reset it when a new load starts. We always reset the last idle on destroy, but if there's another one
leaked, it will crash when scheduled if the window has already been destroyed.

* MiniBrowser/gtk/BrowserWindow.c:
(webViewLoadProgressChanged): Stop any pending reset task when progress != 1.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (232008 => 232009)


--- trunk/Tools/ChangeLog	2018-05-21 00:51:10 UTC (rev 232008)
+++ trunk/Tools/ChangeLog	2018-05-21 06:24:52 UTC (rev 232009)
@@ -1,3 +1,18 @@
+2018-05-20  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] MiniBrowser crashes when loading twice quickly
+        https://bugs.webkit.org/show_bug.cgi?id=185763
+
+        Reviewed by Michael Catanzaro.
+
+        This is very difficult to reproduce manually, but it happens when running WebDriver tests where loads are very
+        fast and multiple loads are done quickly. The problem is that we use an idle to reset the progress bar, but we
+        don't reset it when a new load starts. We always reset the last idle on destroy, but if there's another one
+        leaked, it will crash when scheduled if the window has already been destroyed.
+
+        * MiniBrowser/gtk/BrowserWindow.c:
+        (webViewLoadProgressChanged): Stop any pending reset task when progress != 1.
+
 2018-05-19  Sihui Liu  <sihui_...@apple.com>
 
         Flaky API test WebKit.WKHTTPCookieStoreWithoutProcessPool: incorrect order of cookies

Modified: trunk/Tools/MiniBrowser/gtk/BrowserWindow.c (232008 => 232009)


--- trunk/Tools/MiniBrowser/gtk/BrowserWindow.c	2018-05-21 00:51:10 UTC (rev 232008)
+++ trunk/Tools/MiniBrowser/gtk/BrowserWindow.c	2018-05-21 06:24:52 UTC (rev 232009)
@@ -177,6 +177,9 @@
     if (progress == 1.0) {
         window->resetEntryProgressTimeoutId = g_timeout_add(500, (GSourceFunc)resetEntryProgress, window);
         g_source_set_name_by_id(window->resetEntryProgressTimeoutId, "[WebKit] resetEntryProgress");
+    } else if (window->resetEntryProgressTimeoutId) {
+        g_source_remove(window->resetEntryProgressTimeoutId);
+        window->resetEntryProgressTimeoutId = 0;
     }
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to