WebKit Bugzilla
Attachment 371922 Details for
Bug 198781
: SocketStreamHandle should not be destroyed in a background thread
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198781-20190611213201.patch (text/plain), 2.22 KB, created by
youenn fablet
on 2019-06-11 21:32:02 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-06-11 21:32:02 PDT
Size:
2.22 KB
patch
obsolete
>Subversion Revision: 246170 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 47ef9b859790cba6f83ec776f47b0b6242b546fd..81be7f5b620c627836c9545fb04daeb6a0809fcd 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-11 Youenn Fablet <youenn@apple.com> >+ >+ SocketStreamHandle should not be destroyed in a background thread >+ https://bugs.webkit.org/show_bug.cgi?id=198781 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make sure to destroy SocketStreamHandle on the main thread since it owns an URL created on the main thread. >+ Covered by WPT websocket tests from https://bugs.webkit.org/show_bug.cgi?id=198774. >+ >+ * platform/network/SocketStreamHandle.cpp: >+ (WebCore::SocketStreamHandle::SocketStreamHandle): >+ * platform/network/SocketStreamHandle.h: >+ > 2019-06-11 Youenn Fablet <youenn@apple.com> > > Use NSURLSession for WebSocket >diff --git a/Source/WebCore/platform/network/SocketStreamHandle.cpp b/Source/WebCore/platform/network/SocketStreamHandle.cpp >index 35bee3652f4861788ffdc5f279ba6550ce7ca7eb..dba0f13f479a3326be85d66939e50c63c13b61a0 100644 >--- a/Source/WebCore/platform/network/SocketStreamHandle.cpp >+++ b/Source/WebCore/platform/network/SocketStreamHandle.cpp >@@ -42,6 +42,7 @@ SocketStreamHandle::SocketStreamHandle(const URL& url, SocketStreamHandleClient& > , m_client(client) > , m_state(Connecting) > { >+ ASSERT(isMainThread()); > } > > SocketStreamHandle::SocketStreamState SocketStreamHandle::state() const >diff --git a/Source/WebCore/platform/network/SocketStreamHandle.h b/Source/WebCore/platform/network/SocketStreamHandle.h >index 1569bda3febf847e9c676cd017afe5de3defbe27..68b502a43bb1be2de222d038c18c85510cb2e056 100644 >--- a/Source/WebCore/platform/network/SocketStreamHandle.h >+++ b/Source/WebCore/platform/network/SocketStreamHandle.h >@@ -47,7 +47,7 @@ typedef struct { > #endif > } SourceApplicationAuditToken; > >-class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle> { >+class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle, WTF::DestructionThread::Main> { > public: > enum SocketStreamState { Connecting, Open, Closing, Closed }; > virtual ~SocketStreamHandle() = default;
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 198781
: 371922