Changeset 256678 in webkit
- Timestamp:
- Feb 14, 2020 7:01:54 PM (4 years ago)
- Location:
- branches/safari-609-branch/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-609-branch/Source/WebCore/ChangeLog
r256677 r256678 1 2020-02-14 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r256474. rdar://problem/59446973 4 5 Web Inspector: inspector/cpu-profiler/threads.html is flaky crashing 6 https://bugs.webkit.org/show_bug.cgi?id=207588 7 <rdar://problem/57458123> 8 9 Reviewed by Yusuke Suzuki. 10 11 * page/cocoa/ResourceUsageThreadCocoa.mm: 12 (WebCore::ResourceUsageThread::platformCollectCPUData): 13 Use a fence to force Thread to be completely ready for use by other threads 14 prior to storing it. Otherwise, ResourceUsageThread may see it too early. 15 16 * workers/WorkerThread.cpp: 17 (WebCore::WorkerThread::start): Ignore worker threads that are 18 not fully initialized. 19 20 21 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256474 268f45cc-cd09-0410-ab3c-d52691b4dbfc 22 23 2020-02-12 Brian Burg <bburg@apple.com> 24 25 Web Inspector: inspector/cpu-profiler/threads.html is flaky crashing 26 https://bugs.webkit.org/show_bug.cgi?id=207588 27 <rdar://problem/57458123> 28 29 Reviewed by Yusuke Suzuki. 30 31 * page/cocoa/ResourceUsageThreadCocoa.mm: 32 (WebCore::ResourceUsageThread::platformCollectCPUData): 33 Use a fence to force Thread to be completely ready for use by other threads 34 prior to storing it. Otherwise, ResourceUsageThread may see it too early. 35 36 * workers/WorkerThread.cpp: 37 (WebCore::WorkerThread::start): Ignore worker threads that are 38 not fully initialized. 39 1 40 2020-02-14 Russell Epstein <repstein@apple.com> 2 41 -
branches/safari-609-branch/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm
r249417 r256678 169 169 LockHolder lock(WorkerThread::workerThreadsMutex()); 170 170 for (auto* thread : WorkerThread::workerThreads(lock)) { 171 // Ignore worker threads that have not been fully started yet. 172 if (!thread->thread()) 173 continue; 171 174 mach_port_t machThread = thread->thread()->machThread(); 172 175 if (machThread != MACH_PORT_NULL) -
branches/safari-609-branch/Source/WebCore/workers/WorkerThread.cpp
r252060 r256678 144 144 m_evaluateCallback = WTFMove(evaluateCallback); 145 145 146 m_thread = Thread::create(isServiceWorkerThread() ? "WebCore: Service Worker" : "WebCore: Worker", [this] {146 Ref<Thread> thread = Thread::create(isServiceWorkerThread() ? "WebCore: Service Worker" : "WebCore: Worker", [this] { 147 147 workerThread(); 148 148 }); 149 // Force the Thread object to be initialized fully before storing it to m_thread (and becoming visible to other threads). 150 WTF::storeStoreFence(); 151 m_thread = WTFMove(thread); 149 152 } 150 153
Note: See TracChangeset
for help on using the changeset viewer.