Changeset 224348 in webkit
- Timestamp:
- Nov 2, 2017 12:12:05 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224347 r224348 1 2017-11-02 Alex Christensen <achristensen@webkit.org> 2 3 Fix iOS WebKitLegacy after r224267 4 https://bugs.webkit.org/show_bug.cgi?id=179189 5 6 Reviewed by Tim Horton. 7 8 Use callOnMainThread instead of dispatch_async to work correctly on the web thread. 9 10 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: 11 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): 12 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveAuthenticationChallenge:]): 13 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]): 14 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): 15 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]): 16 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]): 17 (-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]): 18 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didFailWithError:]): 19 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]): 20 1 21 2017-11-02 Adrian Perez de Castro <aperez@igalia.com> 2 22 -
trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
r224267 r224348 130 130 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 131 131 else 132 dispatch_async(dispatch_get_main_queue(), work);132 callOnMainThread(WTFMove(work)); 133 133 134 134 dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER); … … 154 154 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 155 155 else 156 dispatch_async(dispatch_get_main_queue(), work);156 callOnMainThread(WTFMove(work)); 157 157 } 158 158 … … 176 176 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 177 177 else 178 dispatch_async(dispatch_get_main_queue(), work);179 178 callOnMainThread(WTFMove(work)); 179 180 180 dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER); 181 181 return m_boolResult; … … 215 215 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 216 216 else 217 dispatch_async(dispatch_get_main_queue(), work);218 217 callOnMainThread(WTFMove(work)); 218 219 219 dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER); 220 220 } … … 244 244 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 245 245 else 246 dispatch_async(dispatch_get_main_queue(), work);246 callOnMainThread(WTFMove(work)); 247 247 } 248 248 … … 264 264 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 265 265 else 266 dispatch_async(dispatch_get_main_queue(), work);266 callOnMainThread(WTFMove(work)); 267 267 } 268 268 … … 274 274 LOG(Network, "Handle %p delegate connectionDidFinishLoading:%p", m_handle, connection); 275 275 276 auto task = [self = self, protectedSelf = RetainPtr<id>(self)] () mutable {276 auto work = [self = self, protectedSelf = RetainPtr<id>(self)] () mutable { 277 277 if (!m_handle || !m_handle->client()) 278 278 return; … … 286 286 287 287 if (m_messageQueue) 288 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove( task)));289 else 290 dispatch_async(dispatch_get_main_queue(), task);288 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 289 else 290 callOnMainThread(WTFMove(work)); 291 291 } 292 292 … … 312 312 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 313 313 else 314 dispatch_async(dispatch_get_main_queue(), work);314 callOnMainThread(WTFMove(work)); 315 315 } 316 316 … … 336 336 m_messageQueue->append(std::make_unique<Function<void()>>(WTFMove(work))); 337 337 else 338 dispatch_async(dispatch_get_main_queue(), work);338 callOnMainThread(WTFMove(work)); 339 339 340 340 dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
Note: See TracChangeset
for help on using the changeset viewer.