Changeset 279025 in webkit


Ignore:
Timestamp:
Jun 17, 2021 5:00:29 PM (3 years ago)
Author:
achristensen@apple.com
Message:

Add assertion in RunLoop::dispatch
https://bugs.webkit.org/show_bug.cgi?id=227154
<rdar://79243769>

Reviewed by Geoff Garen.

This should help us find what is scheduling null functions.

  • wtf/RunLoop.cpp:

(WTF::RunLoop::dispatch):
(WTF::RunLoop::dispatchAfter):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r279007 r279025  
     12021-06-17  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add assertion in RunLoop::dispatch
     4        https://bugs.webkit.org/show_bug.cgi?id=227154
     5        <rdar://79243769>
     6
     7        Reviewed by Geoff Garen.
     8
     9        This should help us find what is scheduling null functions.
     10
     11        * wtf/RunLoop.cpp:
     12        (WTF::RunLoop::dispatch):
     13        (WTF::RunLoop::dispatchAfter):
     14
    1152021-06-17  Ben Nham  <nham@apple.com>
    216
  • trunk/Source/WTF/wtf/RunLoop.cpp

    r277847 r279025  
    142142}
    143143
    144 void RunLoop::dispatch(Function<void ()>&& function)
     144void RunLoop::dispatch(Function<void()>&& function)
    145145{
     146    RELEASE_ASSERT(function);
    146147    bool needsWakeup = false;
    147148
     
    158159void RunLoop::dispatchAfter(Seconds delay, Function<void()>&& function)
    159160{
     161    RELEASE_ASSERT(function);
    160162    auto timer = new DispatchTimer(*this);
    161163    timer->setFunction([timer, function = WTFMove(function)] {
Note: See TracChangeset for help on using the changeset viewer.