Title: [226794] trunk/Source/WebCore
Revision
226794
Author
achristen...@apple.com
Date
2018-01-11 12:11:13 -0800 (Thu, 11 Jan 2018)

Log Message

Revert changes accidentally committed with r226789.
https://bugs.webkit.org/show_bug.cgi?id=181423

I had some local changes I did not mean to commit.

* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(scheduledWithCustomRunLoopMode):
(-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
(WebCore::if): Deleted.
(WebCore::>::fromCallable): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (226793 => 226794)


--- trunk/Source/WebCore/ChangeLog	2018-01-11 19:58:12 UTC (rev 226793)
+++ trunk/Source/WebCore/ChangeLog	2018-01-11 20:11:13 UTC (rev 226794)
@@ -1,3 +1,16 @@
+2018-01-11  Alex Christensen  <achristen...@webkit.org>
+
+        Revert changes accidentally committed with r226789.
+        https://bugs.webkit.org/show_bug.cgi?id=181423
+
+        I had some local changes I did not mean to commit.
+
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+        (scheduledWithCustomRunLoopMode):
+        (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
+        (WebCore::if): Deleted.
+        (WebCore::>::fromCallable): Deleted.
+
 2018-01-10  Simon Fraser  <simon.fra...@apple.com>
 
         On macOS, getBoundingClientRect gives incorrect values when pinch-zoomed

Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm (226793 => 226794)


--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm	2018-01-11 19:58:12 UTC (rev 226793)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm	2018-01-11 20:11:13 UTC (rev 226794)
@@ -42,6 +42,18 @@
 
 using namespace WebCore;
 
+static bool scheduledWithCustomRunLoopMode(SchedulePairHashSet* pairs)
+{
+    if (!pairs)
+        return false;
+    for (auto& pair : *pairs) {
+        auto mode = pair->mode();
+        if (mode != kCFRunLoopCommonModes && mode != kCFRunLoopDefaultMode)
+            return true;
+    }
+    return false;
+}
+
 @implementation WebCoreResourceHandleAsOperationQueueDelegate
 
 - (void)callFunctionOnMainThread:(Function<void()>&&)function
@@ -52,7 +64,7 @@
 
     // This is the common case.
     SchedulePairHashSet* pairs = m_handle && m_handle->context() ? m_handle->context()->scheduledRunLoopPairs() : nullptr;
-    if (!pairs || pairs->isEmpty()) {
+    if (!scheduledWithCustomRunLoopMode(pairs)) {
 #if PLATFORM(MAC)
         return dispatch_async(dispatch_get_main_queue(), BlockPtr<void()>::fromCallable(WTFMove(function)).get());
 #else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to