Title: [245512] trunk
- Revision
- 245512
- Author
- [email protected]
- Date
- 2019-05-20 01:10:57 -0700 (Mon, 20 May 2019)
Log Message
[GLIB] Repeating timer is not stopped when stop is called from the callback
https://bugs.webkit.org/show_bug.cgi?id=197986
Reviewed by Michael Catanzaro.
Source/WTF:
In case of repeating timers we always update the ready time to fire interval after the user callback is called.
* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::TimerBase::stop): Reset m_fireInterval and m_isRepeating.
Tools:
Check the timer is no longer active after it has been stopped.
* TestWebKitAPI/Tests/WTF/RunLoop.cpp:
(TestWebKitAPI::TEST):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (245511 => 245512)
--- trunk/Source/WTF/ChangeLog 2019-05-20 06:08:47 UTC (rev 245511)
+++ trunk/Source/WTF/ChangeLog 2019-05-20 08:10:57 UTC (rev 245512)
@@ -1,3 +1,15 @@
+2019-05-20 Carlos Garcia Campos <[email protected]>
+
+ [GLIB] Repeating timer is not stopped when stop is called from the callback
+ https://bugs.webkit.org/show_bug.cgi?id=197986
+
+ Reviewed by Michael Catanzaro.
+
+ In case of repeating timers we always update the ready time to fire interval after the user callback is called.
+
+ * wtf/glib/RunLoopGLib.cpp:
+ (WTF::RunLoop::TimerBase::stop): Reset m_fireInterval and m_isRepeating.
+
2019-05-19 Darin Adler <[email protected]>
Change String::number to use "shortest" instead of "fixed precision 6 digits"
Modified: trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp (245511 => 245512)
--- trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp 2019-05-20 06:08:47 UTC (rev 245511)
+++ trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp 2019-05-20 08:10:57 UTC (rev 245512)
@@ -216,6 +216,8 @@
void RunLoop::TimerBase::stop()
{
g_source_set_ready_time(m_source.get(), -1);
+ m_fireInterval = { };
+ m_isRepeating = false;
}
bool RunLoop::TimerBase::isActive() const
Modified: trunk/Tools/ChangeLog (245511 => 245512)
--- trunk/Tools/ChangeLog 2019-05-20 06:08:47 UTC (rev 245511)
+++ trunk/Tools/ChangeLog 2019-05-20 08:10:57 UTC (rev 245512)
@@ -1,3 +1,15 @@
+2019-05-20 Carlos Garcia Campos <[email protected]>
+
+ [GLIB] Repeating timer is not stopped when stop is called from the callback
+ https://bugs.webkit.org/show_bug.cgi?id=197986
+
+ Reviewed by Michael Catanzaro.
+
+ Check the timer is no longer active after it has been stopped.
+
+ * TestWebKitAPI/Tests/WTF/RunLoop.cpp:
+ (TestWebKitAPI::TEST):
+
2019-05-19 Darin Adler <[email protected]>
Change String::number to use "shortest" instead of "fixed precision 6 digits"
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp (245511 => 245512)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp 2019-05-20 06:08:47 UTC (rev 245511)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp 2019-05-20 08:10:57 UTC (rev 245512)
@@ -114,6 +114,7 @@
DerivedRepeatingTimer timer(testFinished);
timer.startRepeating(10_ms);
Util::run(&testFinished);
+ ASSERT_FALSE(timer.isActive());
}
TEST(WTF_RunLoop, ManyTimes)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes