Changeset 191720 in webkit


Ignore:
Timestamp:
Oct 28, 2015 10:20:51 PM (8 years ago)
Author:
Chris Dumez
Message:

Regression(r191673): [WIN][EFL][GTK] layout tests using data URLs time out
https://bugs.webkit.org/show_bug.cgi?id=150661

Reviewed by Gyuyoung Kim.

Do a partial revert of r191673. For some reason, using a Timer in
DataURLDecoder does not work (it does not fire). Since non COCOA ports
don't support RunLoopTimer, this patch reintroduces the use of
callOnMainThread() on non-COCOA ports.

  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::decode):
(WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r191719 r191720  
     12015-10-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r191673): [WIN][EFL][GTK] layout tests using data URLs time out
     4        https://bugs.webkit.org/show_bug.cgi?id=150661
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Do a partial revert of r191673. For some reason, using a Timer in
     9        DataURLDecoder does not work (it does not fire). Since non COCOA ports
     10        don't support RunLoopTimer, this patch reintroduces the use of
     11        callOnMainThread() on non-COCOA ports.
     12
     13        * platform/network/DataURLDecoder.cpp:
     14        (WebCore::DataURLDecoder::decode):
     15        (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer): Deleted.
     16
    1172015-10-28  Joseph Pecoraro  <pecoraro@apple.com>
    218
  • trunk/Source/WebCore/platform/network/DataURLDecoder.cpp

    r191673 r191720  
    3030#include "HTTPParsers.h"
    3131#include "SharedBuffer.h"
    32 #include "Timer.h"
    3332#include "URL.h"
    3433#include <wtf/MainThread.h>
     
    5655};
    5756
     57#if HAVE(RUNLOOP_TIMER)
     58
    5859class DecodingResultDispatcher {
    5960public:
     
    7475    {
    7576        m_timer.startOneShot(0);
    76 #if HAVE(RUNLOOP_TIMER)
    7777        m_timer.schedule(m_decodeTask->scheduleContext.scheduledPairs);
    78 #endif
    7978    }
    8079
     
    8988    }
    9089
    91 #if HAVE(RUNLOOP_TIMER)
    92     typedef RunLoopTimer<DecodingResultDispatcher> DecodingResultDispatcherTimer;
    93 #else
    94     typedef Timer DecodingResultDispatcherTimer;
    95 #endif
    96     DecodingResultDispatcherTimer m_timer;
     90    RunLoopTimer<DecodingResultDispatcher> m_timer;
    9791    std::unique_ptr<DecodeTask> m_decodeTask;
    9892};
     93
     94#endif // HAVE(RUNLOOP_TIMER)
    9995
    10096static Result parseMediaType(const String& mediaType)
     
    178174            decodeEscaped(decodeTask);
    179175
     176#if HAVE(RUNLOOP_TIMER)
    180177        DecodingResultDispatcher::dispatch(std::unique_ptr<DecodeTask>(decodeTaskPtr));
     178#else
     179        callOnMainThread([decodeTaskPtr] {
     180            std::unique_ptr<DecodeTask> decodeTask(decodeTaskPtr);
     181            if (!decodeTask->result.data) {
     182                decodeTask->completionHandler({ });
     183                return;
     184            }
     185            decodeTask->completionHandler(WTF::move(decodeTask->result));
     186        });
     187#endif
    181188    });
    182189}
Note: See TracChangeset for help on using the changeset viewer.