Changeset 225003 in webkit


Ignore:
Timestamp:
Nov 17, 2017 5:00:48 PM (6 years ago)
Author:
achristensen@apple.com
Message:

REGRESSION(224348): [mac-wk1] LayoutTest media/video-src-remove.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=179806

Reviewed by Jer Noble.

In r224348 I used callOnMainThread to fix UIWebView which uses the web thread, but Mac doesn't
use the web thread. Something about the timing of operations in the media stack requires that
dispatch_async be used instead of performSelectorOnMainThread.

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
Use callOnMainThread on iOS, dispatch_async on Mac.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r225000 r225003  
     12017-11-17  Alex Christensen  <achristensen@webkit.org>
     2
     3        REGRESSION(224348): [mac-wk1] LayoutTest media/video-src-remove.html is a flaky timeout
     4        https://bugs.webkit.org/show_bug.cgi?id=179806
     5
     6        Reviewed by Jer Noble.
     7
     8        In r224348 I used callOnMainThread to fix UIWebView which uses the web thread, but Mac doesn't
     9        use the web thread. Something about the timing of operations in the media stack requires that
     10        dispatch_async be used instead of performSelectorOnMainThread.
     11       
     12        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
     13        (-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
     14        Use callOnMainThread on iOS, dispatch_async on Mac.
     15
    1162017-11-17  Per Arne Vollan  <pvollan@apple.com>
    217
  • trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm

    r224982 r225003  
    6565    // This is the common case.
    6666    SchedulePairHashSet* pairs = m_handle && m_handle->context() ? m_handle->context()->scheduledRunLoopPairs() : nullptr;
    67     if (!scheduledWithCustomRunLoopMode(pairs))
     67    if (!scheduledWithCustomRunLoopMode(pairs)) {
     68#if PLATFORM(MAC)
     69        return dispatch_async(dispatch_get_main_queue(), BlockPtr<void()>::fromCallable(WTFMove(function)).get());
     70#else
    6871        return callOnMainThread(WTFMove(function));
    69    
     72#endif
     73    }
     74
    7075    // If we have been scheduled in a custom run loop mode, schedule a block in that mode.
    7176    auto block = BlockPtr<void()>::fromCallable([alreadyCalled = false, function = WTFMove(function)] () mutable {
Note: See TracChangeset for help on using the changeset viewer.