Modified: trunk/Source/WebCore/ChangeLog (224968 => 224969)
--- trunk/Source/WebCore/ChangeLog 2017-11-17 17:42:35 UTC (rev 224968)
+++ trunk/Source/WebCore/ChangeLog 2017-11-17 18:02:27 UTC (rev 224969)
@@ -1,3 +1,16 @@
+2017-11-17 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r224952.
+
+ This change introduced LayoutTest failures on WK1.
+
+ Reverted changeset:
+
+ "Use RunLoop and Mode from NetworkingContext if they are
+ given"
+ https://bugs.webkit.org/show_bug.cgi?id=179800
+ https://trac.webkit.org/changeset/224952
+
2017-11-16 Antoine Quint <[email protected]>
[Web Animations] Force a stacking context during animations that animate properties that will force a stacking context
Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm (224968 => 224969)
--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm 2017-11-17 17:42:35 UTC (rev 224968)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm 2017-11-17 18:02:27 UTC (rev 224969)
@@ -37,7 +37,6 @@
#import "SynchronousLoaderClient.h"
#import "WebCoreURLResponse.h"
#import <pal/spi/cf/CFNetworkSPI.h>
-#import <wtf/BlockPtr.h>
#import <wtf/MainThread.h>
using namespace WebCore;
@@ -51,21 +50,6 @@
return handle->context()->scheduledRunLoopPairs();
}
-static void callOnMainThreadOrSchedule(Function<void()>&& function, SchedulePairHashSet* pairs)
-{
- if (pairs && pairs->size()) {
- auto block = BlockPtr<void()>::fromCallable([alreadyCalled = false, function = WTFMove(function)] () mutable {
- if (alreadyCalled)
- return;
- alreadyCalled = true;
- function();
- });
- for (auto& pair : *pairs)
- CFRunLoopPerformBlock(pair->runLoop(), pair->mode(), block.get());
- } else
- callOnMainThread(WTFMove(function));
-}
-
@implementation WebCoreResourceHandleAsOperationQueueDelegate
- (id)initWithHandle:(ResourceHandle*)handle messageQueue:(MessageQueue<Function<void()>>*)messageQueue
@@ -148,7 +132,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
return m_requestResult.get();
@@ -172,7 +156,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
}
- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace
@@ -194,7 +178,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
return m_boolResult;
@@ -233,7 +217,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
}
@@ -262,7 +246,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
}
- (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
@@ -282,7 +266,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
@@ -306,7 +290,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
@@ -330,7 +314,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
}
@@ -354,7 +338,7 @@
if (m_messageQueue)
m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work)));
else
- callOnMainThreadOrSchedule(WTFMove(work), scheduledRunLoopPairs(m_handle));
+ callOnMainThread(WTFMove(work), scheduledRunLoopPairs(m_handle));
dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
return m_cachedResponseResult.get();