WebKit Bugzilla
Attachment 349292 Details for
Bug 189335
: [RunLoopGeneric] OneShotTimer should not remain "isActive" after fired
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189335-20180910104537.patch (text/plain), 3.11 KB, created by
Yoshiaki Jitsukawa
on 2018-09-09 18:45:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yoshiaki Jitsukawa
Created:
2018-09-09 18:45:39 PDT
Size:
3.11 KB
patch
obsolete
>Subversion Revision: 235778 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index b4983ab31a07b899738ac71f355ddf14986a0018..360a9194d7c22ba3d527b5d278f8634ffd33aa27 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,17 @@ >+2018-09-09 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> >+ >+ [RunLoopGeneric] OneShotTimer should not remain "isActive" after fired >+ https://bugs.webkit.org/show_bug.cgi?id=189335 >+ <rdar://problem/44226604> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/generic/RunLoopGeneric.cpp: >+ (WTF::RunLoop::TimerBase::ScheduledTask::fired): >+ (WTF::RunLoop::TimerBase::isActive const): >+ >+ Deactivate one-shot timer before invoking its callback. >+ > 2018-09-05 Brent Fulgham <bfulgham@apple.com> > > The width of an empty or nullptr TextRun should be zero >diff --git a/Source/WTF/wtf/generic/RunLoopGeneric.cpp b/Source/WTF/wtf/generic/RunLoopGeneric.cpp >index 7869199798c55d821463d5efc180651d1a10d146..b45b1b95bdf3a955f495e120b41a0f8256b1fe7a 100644 >--- a/Source/WTF/wtf/generic/RunLoopGeneric.cpp >+++ b/Source/WTF/wtf/generic/RunLoopGeneric.cpp >@@ -50,12 +50,13 @@ public: > if (!isActive()) > return false; > >- m_function(); >- > if (!m_isRepeating) >- return false; >+ deactivate(); > >- updateReadyTime(); >+ m_function(); >+ >+ if (isActive()) >+ updateReadyTime(); > return isActive(); > } > >@@ -290,7 +291,7 @@ bool RunLoop::TimerBase::isActive() const > > bool RunLoop::TimerBase::isActive(const AbstractLocker&) const > { >- return m_scheduledTask; >+ return m_scheduledTask && m_scheduledTask->isActive(); > } > > Seconds RunLoop::TimerBase::secondsUntilFire() const >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 051a402d080716e6b9de3aadddf5cc4f83d12426..073c3e243b040e57ab4cac6e9560c5bfb7af9b2d 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2018-09-09 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> >+ >+ [RunLoopGeneric] OneShotTimer should not remain "isActive" after fired >+ https://bugs.webkit.org/show_bug.cgi?id=189335 >+ <rdar://problem/44226604> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WTF/RunLoop.cpp: >+ (TestWebKitAPI::TEST): >+ Add an expectation to verify that one-shot timer becomes inactive after it gets fired. >+ > 2018-09-06 Zalan Bujtas <zalan@apple.com> > > [LFC] Add support for min/max-height percentage values. >diff --git a/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp b/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp >index 93b3d8c28f3208176cd3bc52b7f9e3d614a07917..1e642ecf3899acc512202971ca9550f7fbaa2754 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp >+++ b/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp >@@ -85,8 +85,11 @@ TEST(WTF_RunLoop, OneShotTimer) > > void fired() > { >- m_testFinished = true; >- stop(); >+ RunLoop::current().dispatch([this] { >+ EXPECT_FALSE(isActive()); >+ stop(); >+ m_testFinished = true; >+ }); > } > > private:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189335
:
349004
|
349114
|
349292
|
425179
|
425286