Title: [279025] trunk/Source/WTF
Revision
279025
Author
[email protected]
Date
2021-06-17 17:00:29 -0700 (Thu, 17 Jun 2021)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (279024 => 279025)


--- trunk/Source/WTF/ChangeLog	2021-06-17 23:39:50 UTC (rev 279024)
+++ trunk/Source/WTF/ChangeLog	2021-06-18 00:00:29 UTC (rev 279025)
@@ -1,3 +1,17 @@
+2021-06-17  Alex Christensen  <[email protected]>
+
+        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):
+
 2021-06-17  Ben Nham  <[email protected]>
 
         Remove Mac-specific CPUTime functions

Modified: trunk/Source/WTF/wtf/RunLoop.cpp (279024 => 279025)


--- trunk/Source/WTF/wtf/RunLoop.cpp	2021-06-17 23:39:50 UTC (rev 279024)
+++ trunk/Source/WTF/wtf/RunLoop.cpp	2021-06-18 00:00:29 UTC (rev 279025)
@@ -141,8 +141,9 @@
         wakeUp();
 }
 
-void RunLoop::dispatch(Function<void ()>&& function)
+void RunLoop::dispatch(Function<void()>&& function)
 {
+    RELEASE_ASSERT(function);
     bool needsWakeup = false;
 
     {
@@ -157,6 +158,7 @@
 
 void RunLoop::dispatchAfter(Seconds delay, Function<void()>&& function)
 {
+    RELEASE_ASSERT(function);
     auto timer = new DispatchTimer(*this);
     timer->setFunction([timer, function = WTFMove(function)] {
         function();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to