Title: [270746] trunk
Revision
270746
Author
[email protected]
Date
2020-12-12 21:43:50 -0800 (Sat, 12 Dec 2020)

Log Message

Unreviewed, reverting r270661.

Caused layout test failures and timeouts

Reverted changeset:

"Unreviewed, re-landing r270132."
https://bugs.webkit.org/show_bug.cgi?id=202874
https://trac.webkit.org/changeset/270661

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (270745 => 270746)


--- trunk/Source/WTF/ChangeLog	2020-12-13 05:41:28 UTC (rev 270745)
+++ trunk/Source/WTF/ChangeLog	2020-12-13 05:43:50 UTC (rev 270746)
@@ -1,3 +1,15 @@
+2020-12-12  Ryan Haddad  <[email protected]>
+
+        Unreviewed, reverting r270661.
+
+        Caused layout test failures and timeouts
+
+        Reverted changeset:
+
+        "Unreviewed, re-landing r270132."
+        https://bugs.webkit.org/show_bug.cgi?id=202874
+        https://trac.webkit.org/changeset/270661
+
 2020-12-12  Jiewen Tan  <[email protected]>
 
         [WebAuthn][iOS] Turn on modern WebAuthn for default browsers
@@ -4903,8 +4915,7 @@
 
         Reviewed by Carlos Garcia Campos.
 
-        As of https://bugs.webkit.org/show_bug.cgi?id=213063, Darwin platforms
-        use the RunLoop. Let's match them for consistency, and to delete some
+     ����������������������������������������������������������������������������������������������������������������������������������������������������        use the RunLoop. Let's match them for consistency, and to delete some
         code.
 
         * wtf/generic/MainThreadGeneric.cpp:

Modified: trunk/Source/WTF/wtf/RunLoop.h (270745 => 270746)


--- trunk/Source/WTF/wtf/RunLoop.h	2020-12-13 05:41:28 UTC (rev 270745)
+++ trunk/Source/WTF/wtf/RunLoop.h	2020-12-13 05:43:50 UTC (rev 270746)
@@ -227,10 +227,9 @@
 
     Lock m_loopLock;
 #elif USE(COCOA_EVENT_LOOP)
-    static void performWork(CFMachPortRef, void* msg, CFIndex size, void* info);
+    static void performWork(void*);
     RetainPtr<CFRunLoopRef> m_runLoop;
     RetainPtr<CFRunLoopSourceRef> m_runLoopSource;
-    RetainPtr<CFMachPortRef> m_port;
 #elif USE(GLIB_EVENT_LOOP)
     void notify(Event, const char*);
 

Modified: trunk/Source/WTF/wtf/cf/RunLoopCF.cpp (270745 => 270746)


--- trunk/Source/WTF/wtf/cf/RunLoopCF.cpp	2020-12-13 05:41:28 UTC (rev 270745)
+++ trunk/Source/WTF/wtf/cf/RunLoopCF.cpp	2020-12-13 05:43:50 UTC (rev 270746)
@@ -28,7 +28,6 @@
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <dispatch/dispatch.h>
-#include <mach/mach.h>
 #include <wtf/AutodrainedPool.h>
 #include <wtf/SchedulePair.h>
 
@@ -41,39 +40,29 @@
     return adoptCF(CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + interval.seconds(), repeatInterval.seconds(), 0, 0, timerFired, &context));
 }
 
-void RunLoop::performWork(CFMachPortRef, void*, CFIndex, void* info)
+void RunLoop::performWork(void* context)
 {
     AutodrainedPool pool;
-    static_cast<RunLoop*>(info)->performWork();
+    static_cast<RunLoop*>(context)->performWork();
 }
 
 RunLoop::RunLoop()
     : m_runLoop(CFRunLoopGetCurrent())
 {
-    CFMachPortContext context = { 0, this, nullptr, nullptr, nullptr };
-    m_port = adoptCF(CFMachPortCreate(kCFAllocatorDefault, performWork, &context, nullptr));
-    m_runLoopSource = adoptCF(CFMachPortCreateRunLoopSource(kCFAllocatorDefault, m_port.get(), 0));
+    CFRunLoopSourceContext context = { 0, this, 0, 0, 0, 0, 0, 0, 0, performWork };
+    m_runLoopSource = adoptCF(CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &context));
     CFRunLoopAddSource(m_runLoop.get(), m_runLoopSource.get(), kCFRunLoopCommonModes);
 }
 
 RunLoop::~RunLoop()
 {
-    CFMachPortInvalidate(m_port.get());
     CFRunLoopSourceInvalidate(m_runLoopSource.get());
 }
 
 void RunLoop::wakeUp()
 {
-    mach_msg_header_t header;
-    header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0);
-    header.msgh_size = sizeof(mach_msg_header_t);
-    header.msgh_remote_port = CFMachPortGetPort(m_port.get());
-    header.msgh_local_port = MACH_PORT_NULL;
-    header.msgh_id = 0;
-    mach_msg_return_t result = mach_msg(&header, MACH_SEND_MSG | MACH_SEND_TIMEOUT, header.msgh_size, 0, MACH_PORT_NULL, 0, MACH_PORT_NULL);
-    RELEASE_ASSERT(result == MACH_MSG_SUCCESS || result == MACH_SEND_TIMED_OUT);
-    if (result == MACH_SEND_TIMED_OUT)
-        mach_msg_destroy(&header);
+    CFRunLoopSourceSignal(m_runLoopSource.get());
+    CFRunLoopWakeUp(m_runLoop.get());
 }
 
 RunLoop::CycleResult RunLoop::cycle(RunLoopMode mode)

Modified: trunk/Tools/ChangeLog (270745 => 270746)


--- trunk/Tools/ChangeLog	2020-12-13 05:41:28 UTC (rev 270745)
+++ trunk/Tools/ChangeLog	2020-12-13 05:43:50 UTC (rev 270746)
@@ -1,3 +1,15 @@
+2020-12-12  Ryan Haddad  <[email protected]>
+
+        Unreviewed, reverting r270661.
+
+        Caused layout test failures and timeouts
+
+        Reverted changeset:
+
+        "Unreviewed, re-landing r270132."
+        https://bugs.webkit.org/show_bug.cgi?id=202874
+        https://trac.webkit.org/changeset/270661
+
 2020-12-12  Jiewen Tan  <[email protected]>
 
         [WebAuthn][iOS] Turn on modern WebAuthn for default browsers

Modified: trunk/Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm (270745 => 270746)


--- trunk/Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm	2020-12-13 05:41:28 UTC (rev 270745)
+++ trunk/Tools/TestWebKitAPI/cocoa/UtilitiesCocoa.mm	2020-12-13 05:43:50 UTC (rev 270746)
@@ -38,7 +38,7 @@
 void spinRunLoop(uint64_t count)
 {
     for (uint64_t i = 0; i < count; ++i)
-        while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true) == kCFRunLoopRunHandledSource) { }
+        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
 }
 
 void sleep(double seconds)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to