Changeset 245260 in webkit
- Timestamp:
- May 13, 2019 3:42:53 PM (5 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r245258 r245260 1 2019-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 1 15 2019-05-13 Yusuke Suzuki <ysuzuki@apple.com> 2 16 -
trunk/Source/WTF/wtf/Threading.h
r245258 r245260 72 72 #endif 73 73 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 instead76 // 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 #endif82 83 74 enum class GCThreadType : uint8_t { 84 75 None = 0, … … 91 82 friend class ThreadGroup; 92 83 friend WTF_EXPORT_PRIVATE void initializeThreading(); 93 #if OS(WINDOWS)94 friend WTF_EXPORT_PRIVATE int waitForThreadCompletion(ThreadIdentifier);95 #endif96 84 97 85 WTF_EXPORT_PRIVATE ~Thread(); … … 370 358 using WTF::Thread; 371 359 using 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 288 288 } 289 289 290 // FIXME: Remove this workaround code once <rdar://problem/31793213> is fixed.291 290 RefPtr<Thread> Thread::get(ThreadIdentifier id) 292 291 { … … 428 427 } 429 428 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 and442 // 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 454 429 void Thread::yield() 455 430 {
Note: See TracChangeset
for help on using the changeset viewer.