Changeset 245260 in webkit


Ignore:
Timestamp:
May 13, 2019 3:42:53 PM (5 years ago)
Author:
ysuzuki@apple.com
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.

Location:
trunk/Source/WTF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r245258 r245260  
     12019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [WTF] Remove Threading workaround for support libraries in Windows
     4        https://bugs.webkit.org/show_bug.cgi?id=197350
     5
     6        Reviewed by Darin Adler.
     7
     8        We kept old APIs for some support libraries at 2017. This patch removes them.
     9
     10        * wtf/Threading.h:
     11        * wtf/win/ThreadingWin.cpp:
     12        (WTF::createThread): Deleted.
     13        (WTF::waitForThreadCompletion): Deleted.
     14
    1152019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
    216
  • trunk/Source/WTF/wtf/Threading.h

    r245258 r245260  
    7272#endif
    7373
    74 // FIXME: The following functions remain because they are used from WebKit Windows support library,
    75 // WebKitQuartzCoreAdditions.dll. When updating the support library, we should use new API instead
    76 // and the following workaound should be removed. And new code should not use the following APIs.
    77 // Remove this workaround code when <rdar://problem/31793213> is fixed.
    78 #if OS(WINDOWS)
    79 WTF_EXPORT_PRIVATE ThreadIdentifier createThread(ThreadFunction, void*, const char* threadName);
    80 WTF_EXPORT_PRIVATE int waitForThreadCompletion(ThreadIdentifier);
    81 #endif
    82 
    8374enum class GCThreadType : uint8_t {
    8475    None = 0,
     
    9182    friend class ThreadGroup;
    9283    friend WTF_EXPORT_PRIVATE void initializeThreading();
    93 #if OS(WINDOWS)
    94     friend WTF_EXPORT_PRIVATE int waitForThreadCompletion(ThreadIdentifier);
    95 #endif
    9684
    9785    WTF_EXPORT_PRIVATE ~Thread();
     
    370358using WTF::Thread;
    371359using WTF::GCThreadType;
    372 
    373 #if OS(WINDOWS)
    374 using WTF::ThreadIdentifier;
    375 using WTF::createThread;
    376 using WTF::waitForThreadCompletion;
    377 #endif
  • trunk/Source/WTF/wtf/win/ThreadingWin.cpp

    r240636 r245260  
    288288}
    289289
    290 // FIXME: Remove this workaround code once <rdar://problem/31793213> is fixed.
    291290RefPtr<Thread> Thread::get(ThreadIdentifier id)
    292291{
     
    428427}
    429428
    430 // Remove this workaround code when <rdar://problem/31793213> is fixed.
    431 ThreadIdentifier createThread(ThreadFunction function, void* data, const char* threadName)
    432 {
    433     return Thread::create(threadName, [function, data] {
    434         function(data);
    435     })->id();
    436 }
    437 
    438 int waitForThreadCompletion(ThreadIdentifier threadID)
    439 {
    440     // This function is implemented based on the old Threading implementation.
    441     // It remains only due to the support library using old Threading APIs and
    442     // it should not be used in new code.
    443     ASSERT(threadID);
    444 
    445     RefPtr<Thread> thread = Thread::get(threadID);
    446     if (!thread) {
    447         LOG_ERROR("ThreadIdentifier %u did not correspond to an active thread when trying to quit", threadID);
    448         return WAIT_FAILED;
    449     }
    450     return thread->waitForCompletion();
    451 
    452 }
    453 
    454429void Thread::yield()
    455430{
Note: See TracChangeset for help on using the changeset viewer.