Title: [245260] trunk/Source/WTF
Revision
245260
Author
ysuz...@apple.com
Date
2019-05-13 15:42:53 -0700 (Mon, 13 May 2019)

Log Message

[WTF] Remove Threading workaround for support libraries in Windows
https://bugs.webkit.org/show_bug.cgi?id=197350

Reviewed by Darin Adler.

We kept old APIs for some support libraries at 2017. This patch removes them.

* wtf/Threading.h:
* wtf/win/ThreadingWin.cpp:
(WTF::createThread): Deleted.
(WTF::waitForThreadCompletion): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (245259 => 245260)


--- trunk/Source/WTF/ChangeLog	2019-05-13 22:36:59 UTC (rev 245259)
+++ trunk/Source/WTF/ChangeLog	2019-05-13 22:42:53 UTC (rev 245260)
@@ -1,5 +1,19 @@
 2019-05-13  Yusuke Suzuki  <ysuz...@apple.com>
 
+        [WTF] Remove Threading workaround for support libraries in Windows
+        https://bugs.webkit.org/show_bug.cgi?id=197350
+
+        Reviewed by Darin Adler.
+
+        We kept old APIs for some support libraries at 2017. This patch removes them.
+
+        * wtf/Threading.h:
+        * wtf/win/ThreadingWin.cpp:
+        (WTF::createThread): Deleted.
+        (WTF::waitForThreadCompletion): Deleted.
+
+2019-05-13  Yusuke Suzuki  <ysuz...@apple.com>
+
         [WTF] Simplify GCThread and CompilationThread flags by adding them to WTF::Thread
         https://bugs.webkit.org/show_bug.cgi?id=197146
 

Modified: trunk/Source/WTF/wtf/Threading.h (245259 => 245260)


--- trunk/Source/WTF/wtf/Threading.h	2019-05-13 22:36:59 UTC (rev 245259)
+++ trunk/Source/WTF/wtf/Threading.h	2019-05-13 22:42:53 UTC (rev 245260)
@@ -71,15 +71,6 @@
 
 #endif
 
-// FIXME: The following functions remain because they are used from WebKit Windows support library,
-// WebKitQuartzCoreAdditions.dll. When updating the support library, we should use new API instead
-// and the following workaound should be removed. And new code should not use the following APIs.
-// Remove this workaround code when <rdar://problem/31793213> is fixed.
-#if OS(WINDOWS)
-WTF_EXPORT_PRIVATE ThreadIdentifier createThread(ThreadFunction, void*, const char* threadName);
-WTF_EXPORT_PRIVATE int waitForThreadCompletion(ThreadIdentifier);
-#endif
-
 enum class GCThreadType : uint8_t {
     None = 0,
     Main,
@@ -90,9 +81,6 @@
 public:
     friend class ThreadGroup;
     friend WTF_EXPORT_PRIVATE void initializeThreading();
-#if OS(WINDOWS)
-    friend WTF_EXPORT_PRIVATE int waitForThreadCompletion(ThreadIdentifier);
-#endif
 
     WTF_EXPORT_PRIVATE ~Thread();
 
@@ -369,9 +357,3 @@
 
 using WTF::Thread;
 using WTF::GCThreadType;
-
-#if OS(WINDOWS)
-using WTF::ThreadIdentifier;
-using WTF::createThread;
-using WTF::waitForThreadCompletion;
-#endif

Modified: trunk/Source/WTF/wtf/win/ThreadingWin.cpp (245259 => 245260)


--- trunk/Source/WTF/wtf/win/ThreadingWin.cpp	2019-05-13 22:36:59 UTC (rev 245259)
+++ trunk/Source/WTF/wtf/win/ThreadingWin.cpp	2019-05-13 22:42:53 UTC (rev 245260)
@@ -287,7 +287,6 @@
     return threadMap().get(currentID());
 }
 
-// FIXME: Remove this workaround code once <rdar://problem/31793213> is fixed.
 RefPtr<Thread> Thread::get(ThreadIdentifier id)
 {
     auto locker = holdLock(threadMapMutex);
@@ -427,30 +426,6 @@
     WakeAllConditionVariable(&m_condition);
 }
 
-// Remove this workaround code when <rdar://problem/31793213> is fixed.
-ThreadIdentifier createThread(ThreadFunction function, void* data, const char* threadName)
-{
-    return Thread::create(threadName, [function, data] {
-        function(data);
-    })->id();
-}
-
-int waitForThreadCompletion(ThreadIdentifier threadID)
-{
-    // This function is implemented based on the old Threading implementation.
-    // It remains only due to the support library using old Threading APIs and
-    // it should not be used in new code.
-    ASSERT(threadID);
-
-    RefPtr<Thread> thread = Thread::get(threadID);
-    if (!thread) {
-        LOG_ERROR("ThreadIdentifier %u did not correspond to an active thread when trying to quit", threadID);
-        return WAIT_FAILED;
-    }
-    return thread->waitForCompletion();
-
-}
-
 void Thread::yield()
 {
     SwitchToThread();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to