Changeset 248182 in webkit
- Timestamp:
- Aug 2, 2019 2:32:09 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248181 r248182 1 2019-08-02 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [Curl] Crash while destructing a URL in ~SocketStreamHandle due to data race 4 https://bugs.webkit.org/show_bug.cgi?id=200378 5 6 Reviewed by Ross Kirsling. 7 8 URL::isolatedCopy() is called in the worker thread. URL is using a 9 thread-unsafe ref-counter. It should be called in the main thread. 10 11 Covered by existing tests. 12 13 * platform/network/curl/SocketStreamHandleImpl.h: 14 * platform/network/curl/SocketStreamHandleImplCurl.cpp: 15 (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl): Call URL::isolatedCopy() in the main thread. 16 (WebCore::SocketStreamHandleImpl::threadEntryPoint): Added a URL argument. 17 1 18 2019-08-02 Sihui Liu <sihui_liu@apple.com> 2 19 -
trunk/Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h
r245802 r248182 65 65 bool sendPendingData(); 66 66 67 void threadEntryPoint( );67 void threadEntryPoint(const URL&); 68 68 void handleError(CURLcode); 69 69 void stopThread(); -
trunk/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp
r245802 r248182 58 58 CurlContext::singleton().sslHandle().setIgnoreSSLErrors(true); 59 59 60 m_workerThread = Thread::create("WebSocket thread", [this, protectedThis = makeRef(*this) ] {61 threadEntryPoint( );60 m_workerThread = Thread::create("WebSocket thread", [this, protectedThis = makeRef(*this), url = url.isolatedCopy()] { 61 threadEntryPoint(url); 62 62 }); 63 63 } … … 105 105 } 106 106 107 void SocketStreamHandleImpl::threadEntryPoint( )107 void SocketStreamHandleImpl::threadEntryPoint(const URL& url) 108 108 { 109 109 ASSERT(!isMainThread()); 110 110 111 CurlSocketHandle socket { m_url.isolatedCopy(), [this](CURLcode errorCode) {111 CurlSocketHandle socket { url, [this](CURLcode errorCode) { 112 112 handleError(errorCode); 113 113 }};
Note: See TracChangeset
for help on using the changeset viewer.