WebKit Bugzilla
Attachment 369828 Details for
Bug 197873
: [CURL] Fix crashing SocketStreamHandle.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197873-20190514175737.patch (text/plain), 5.00 KB, created by
Takashi Komori
on 2019-05-14 02:00:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Takashi Komori
Created:
2019-05-14 02:00:15 PDT
Size:
5.00 KB
patch
obsolete
>Subversion Revision: 245077 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2c4faf7f2a925d90f6935fecd87e650679a8308c..abef70fbf3d86bda81f4d19cf0e08b06aea4e003 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-05-14 Takashi Komori <Takashi.Komori@sony.com> >+ >+ [CURL] Fix crashing SocketStreamHandle. >+ https://bugs.webkit.org/show_bug.cgi?id=197873 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When NetworkSocketStream is destructed SocketStreamHandleImple::platformClose is called wrongly times. >+ This is because closed state is not set. >+ >+ Test: http/tests/websocket/tests/hybi/workers/close.html >+ >+ * platform/network/curl/SocketStreamHandleImplCurl.cpp: >+ (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl): >+ (WebCore::SocketStreamHandleImpl::platformClose): >+ (WebCore::SocketStreamHandleImpl::threadEntryPoint): >+ (WebCore::SocketStreamHandleImpl::handleError): >+ > 2019-05-08 Timothy Hatcher <timothy@apple.com> > > Add plumbing for inactive system colors in RenderTheme cache. >diff --git a/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp b/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp >index ddec679eb9885045526490b0cc5c07322a52dea6..d574ecc720581c2da696ddf9463f1f5c4beb20cd 100644 >--- a/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp >+++ b/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp >@@ -48,7 +48,7 @@ > namespace WebCore { > > SocketStreamHandleImpl::SocketStreamHandleImpl(const URL& url, SocketStreamHandleClient& client, const StorageSessionProvider* provider) >- : SocketStreamHandle(url, client) >+ : SocketStreamHandle(url.isolatedCopy(), client) > , m_storageSessionProvider(provider) > { > LOG(Network, "SocketStreamHandle %p new client %p", this, &m_client); >@@ -103,6 +103,7 @@ void SocketStreamHandleImpl::platformClose() > > if (m_state == Closed) > return; >+ m_state = Closed; > > stopThread(); > m_client.didCloseSocketStream(*this); >@@ -143,8 +144,6 @@ void SocketStreamHandleImpl::threadEntryPoint() > if (writeBufferSize > offset) > m_writeBufferOffset = offset; > else { >- m_writeBuffer = nullptr; >- m_writeBufferOffset = 0; > m_writeBufferSize.store(0); > callOnMainThread([this, protectedThis = makeRef(*this)] { > sendPendingData(); >@@ -180,6 +179,9 @@ void SocketStreamHandleImpl::handleError(CURLcode errorCode) > { > m_running = false; > callOnMainThread([this, protectedThis = makeRef(*this), errorCode, localizedDescription = CurlHandle::errorDescription(errorCode)] { >+ if (m_state == Closed) >+ return; >+ > if (errorCode == CURLE_RECV_ERROR) > m_client.didFailToReceiveSocketStreamData(*this); > else >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ee33a4d59b7ed6aed93b6c912eb2f9be2ff53057..70270af6607f52a11270690d9fefbe3c46499fbd 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-05-14 Takashi Komori <Takashi.Komori@sony.com> >+ >+ [CURL] Fix crashing SocketStreamHandle. >+ https://bugs.webkit.org/show_bug.cgi?id=197873 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/wincairo-wk1/TestExpectations: >+ * platform/wincairo/TestExpectations: >+ > 2019-05-08 Tim Horton <timothy_horton@apple.com> > > Unreviewed test rebaselines. >diff --git a/LayoutTests/platform/wincairo-wk1/TestExpectations b/LayoutTests/platform/wincairo-wk1/TestExpectations >index 54a9bb77921ab0f2f33353e8b2be2c5bd9772bb6..bb1fa0e226d0af8754d3479a6de2998cf3233def 100644 >--- a/LayoutTests/platform/wincairo-wk1/TestExpectations >+++ b/LayoutTests/platform/wincairo-wk1/TestExpectations >@@ -12,6 +12,8 @@ > > # Failures on WebKit Legacy > >+webkit.org/b/89153 http/tests/websocket/tests/hybi/workers/close.html [ Pass Failure ] >+ > # Cookie policy only supported in WK2. > http/tests/cookies/only-accept-first-party-cookies.html [ Skip ] > http/tests/cookies/third-party-cookie-relaxing.html [ Skip ] >diff --git a/LayoutTests/platform/wincairo/TestExpectations b/LayoutTests/platform/wincairo/TestExpectations >index 3291973db7b942474bd61310f258da52a44990fd..0f84cc17ce629b7b8b6cc1470b90b47663fdf355 100644 >--- a/LayoutTests/platform/wincairo/TestExpectations >+++ b/LayoutTests/platform/wincairo/TestExpectations >@@ -969,7 +969,6 @@ http/tests/websocket/tests/hybi/upgrade-simple-ws.html [ Pass Failure ] > http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party.html [ Pass Failure ] > http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party.html [ Pass Failure ] > http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html [ Pass Failure ] >-http/tests/websocket/tests/hybi/workers/close.html [ Pass Failure ] > http/tests/websocket/tests/hybi/workers/worker-reload.html [ Timeout Pass ] > > http/tests/workers/service [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197873
:
369828
|
369839
|
370302
|
370388
|
370392
|
370479
|
370633
|
370634
|
370668