Summary: | [Cocoa] [GTK] RunLoop::Timer::isActive() is incorrect for timers while they are firing | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> | ||||||||
Component: | New Bugs | Assignee: | Geoffrey Garen <ggaren> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | andersca, benjamin, cdumez, cgarcia, cmarcelo, darin, ews-watchlist, jiewen_tan, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Geoffrey Garen
2020-06-29 20:32:20 PDT
Created attachment 403168 [details]
Patch
Looks like a variant of gtk had this bug too. Created attachment 403223 [details]
Patch
Comment on attachment 403223 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403223&action=review > Source/WTF/wtf/cf/RunLoopCF.cpp:95 > + if (!CFRunLoopTimerDoesRepeat(cfTimer)) > + timer->stop(); > + > timer->fired(); Could we have put this code inside TimerBase::fired instead? Or does it not have an efficient way to check if the timer is non-repeating? If stop() would do the trick on GLib too that would be neat. Glib already had the implicit stop behavior. It needed the inverse fix: be sure to restart if you are a repeating timer. I do think we can/should do a shared implementation of isActive in TimerBase. Windows already has all the code we need; just need to migrate it. I hope to return and do that after I finish off callOnMainThread. Committed r263783: <https://trac.webkit.org/changeset/263783> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403223 [details]. Reopening to attach new patch. Created attachment 403265 [details]
Assertion fix
Committed r263786: <https://trac.webkit.org/changeset/263786> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403265 [details]. |