Bug 125885 - Botwatcher's dashboard ceases to update itself after a while
Summary: Botwatcher's dashboard ceases to update itself after a while
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-17 16:39 PST by Alexey Proskuryakov
Modified: 2013-12-18 09:42 PST (History)
4 users (show)

See Also:


Attachments
test case for timeout failure (336 bytes, patch)
2013-12-17 16:41 PST, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff
proposed fix (4.61 KB, patch)
2013-12-17 16:46 PST, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2013-12-17 16:39:10 PST
<http://trac.webkit.org/changeset/159659> switched from setInterval to setTimeout, and the code now assumes that _updateQueues is called too early if and only if it's because a platform was unhidden.

But looks like JS timers can now fire too early sometimes, in which case we never re-schedule the timeout, and the view becomes dead forever.

I'm not quite sure when this happens. This could legitimately happen due to NTP adjustment, or there may be a bug with timer coalescing.
Comment 1 Alexey Proskuryakov 2013-12-17 16:41:16 PST
Created attachment 219471 [details]
test case for timeout failure

For future reference, this is a standalone test that shows how current dashboard update code fails. I can easily reproduce this by keeping the test open for a few minutes (and if there are multiple instances open, they always fail simultaneously). I'm testing on Mavericks.
Comment 2 Alexey Proskuryakov 2013-12-17 16:46:26 PST
Created attachment 219474 [details]
proposed fix
Comment 3 WebKit Commit Bot 2013-12-17 19:22:36 PST
Comment on attachment 219474 [details]
proposed fix

Clearing flags on attachment: 219474

Committed r160744: <http://trac.webkit.org/changeset/160744>
Comment 4 WebKit Commit Bot 2013-12-17 19:22:38 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Alexey Proskuryakov 2013-12-18 09:42:15 PST
Note that this removes the behavior of immediately fetching when showing a previously hidden view. Maybe we should restore this, but we need to look carefully into the possibility of two updates running simultaneously, and what consequences that would have.