Changeset 232009 in webkit


Ignore:
Timestamp:
May 20, 2018 11:24:52 PM (6 years ago)
Author:
Carlos Garcia Campos
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r231999 r232009  
     12018-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] MiniBrowser crashes when loading twice quickly
     4        https://bugs.webkit.org/show_bug.cgi?id=185763
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        This is very difficult to reproduce manually, but it happens when running WebDriver tests where loads are very
     9        fast and multiple loads are done quickly. The problem is that we use an idle to reset the progress bar, but we
     10        don't reset it when a new load starts. We always reset the last idle on destroy, but if there's another one
     11        leaked, it will crash when scheduled if the window has already been destroyed.
     12
     13        * MiniBrowser/gtk/BrowserWindow.c:
     14        (webViewLoadProgressChanged): Stop any pending reset task when progress != 1.
     15
    1162018-05-19  Sihui Liu  <sihui_liu@apple.com>
    217
  • trunk/Tools/MiniBrowser/gtk/BrowserWindow.c

    r221833 r232009  
    178178        window->resetEntryProgressTimeoutId = g_timeout_add(500, (GSourceFunc)resetEntryProgress, window);
    179179        g_source_set_name_by_id(window->resetEntryProgressTimeoutId, "[WebKit] resetEntryProgress");
     180    } else if (window->resetEntryProgressTimeoutId) {
     181        g_source_remove(window->resetEntryProgressTimeoutId);
     182        window->resetEntryProgressTimeoutId = 0;
    180183    }
    181184}
Note: See TracChangeset for help on using the changeset viewer.