Title: [191754] tags/Safari-602.1.9/Source/WebCore
Revision
191754
Author
[email protected]
Date
2015-10-29 14:14:18 -0700 (Thu, 29 Oct 2015)

Log Message

Merged r191720.

Modified Paths

Diff

Modified: tags/Safari-602.1.9/Source/WebCore/ChangeLog (191753 => 191754)


--- tags/Safari-602.1.9/Source/WebCore/ChangeLog	2015-10-29 21:08:05 UTC (rev 191753)
+++ tags/Safari-602.1.9/Source/WebCore/ChangeLog	2015-10-29 21:14:18 UTC (rev 191754)
@@ -1,3 +1,23 @@
+2015-10-29  Babak Shafiei  <[email protected]>
+
+        Merge r191720.
+
+    2015-10-28  Chris Dumez  <[email protected]>
+
+            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.
+
 2015-10-28  Babak Shafiei  <[email protected]>
 
         Merge r191673.

Modified: tags/Safari-602.1.9/Source/WebCore/platform/network/DataURLDecoder.cpp (191753 => 191754)


--- tags/Safari-602.1.9/Source/WebCore/platform/network/DataURLDecoder.cpp	2015-10-29 21:08:05 UTC (rev 191753)
+++ tags/Safari-602.1.9/Source/WebCore/platform/network/DataURLDecoder.cpp	2015-10-29 21:14:18 UTC (rev 191754)
@@ -29,7 +29,6 @@
 #include "DecodeEscapeSequences.h"
 #include "HTTPParsers.h"
 #include "SharedBuffer.h"
-#include "Timer.h"
 #include "URL.h"
 #include <wtf/MainThread.h>
 #include <wtf/RunLoop.h>
@@ -55,6 +54,8 @@
     Result result;
 };
 
+#if HAVE(RUNLOOP_TIMER)
+
 class DecodingResultDispatcher {
 public:
     static void dispatch(std::unique_ptr<DecodeTask> decodeTask)
@@ -73,9 +74,7 @@
     void startTimer()
     {
         m_timer.startOneShot(0);
-#if HAVE(RUNLOOP_TIMER)
         m_timer.schedule(m_decodeTask->scheduleContext.scheduledPairs);
-#endif
     }
 
     void timerFired()
@@ -88,15 +87,12 @@
         delete this;
     }
 
-#if HAVE(RUNLOOP_TIMER)
-    typedef RunLoopTimer<DecodingResultDispatcher> DecodingResultDispatcherTimer;
-#else
-    typedef Timer DecodingResultDispatcherTimer;
-#endif
-    DecodingResultDispatcherTimer m_timer;
+    RunLoopTimer<DecodingResultDispatcher> m_timer;
     std::unique_ptr<DecodeTask> m_decodeTask;
 };
 
+#endif // HAVE(RUNLOOP_TIMER)
+
 static Result parseMediaType(const String& mediaType)
 {
     auto mimeType = extractMIMETypeFromMediaType(mediaType);
@@ -177,7 +173,18 @@
         else
             decodeEscaped(decodeTask);
 
+#if HAVE(RUNLOOP_TIMER)
         DecodingResultDispatcher::dispatch(std::unique_ptr<DecodeTask>(decodeTaskPtr));
+#else
+        callOnMainThread([decodeTaskPtr] {
+            std::unique_ptr<DecodeTask> decodeTask(decodeTaskPtr);
+            if (!decodeTask->result.data) {
+                decodeTask->completionHandler({ });
+                return;
+            }
+            decodeTask->completionHandler(WTF::move(decodeTask->result));
+        });
+#endif
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to