Title: [246405] trunk/Source/WebCore
- Revision
- 246405
- Author
- [email protected]
- Date
- 2019-06-13 11:14:31 -0700 (Thu, 13 Jun 2019)
Log Message
SocketStreamHandle should not be destroyed in a background thread
https://bugs.webkit.org/show_bug.cgi?id=198781
Reviewed by Geoffrey Garen.
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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246404 => 246405)
--- trunk/Source/WebCore/ChangeLog 2019-06-13 16:05:27 UTC (rev 246404)
+++ trunk/Source/WebCore/ChangeLog 2019-06-13 18:14:31 UTC (rev 246405)
@@ -1,3 +1,17 @@
+2019-06-13 Youenn Fablet <[email protected]>
+
+ SocketStreamHandle should not be destroyed in a background thread
+ https://bugs.webkit.org/show_bug.cgi?id=198781
+
+ Reviewed by Geoffrey Garen.
+
+ 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-13 Antoine Quint <[email protected]>
"display: contents" Content click does not trigger
Modified: trunk/Source/WebCore/platform/network/SocketStreamHandle.cpp (246404 => 246405)
--- trunk/Source/WebCore/platform/network/SocketStreamHandle.cpp 2019-06-13 16:05:27 UTC (rev 246404)
+++ trunk/Source/WebCore/platform/network/SocketStreamHandle.cpp 2019-06-13 18:14:31 UTC (rev 246405)
@@ -42,6 +42,7 @@
, m_client(client)
, m_state(Connecting)
{
+ ASSERT(isMainThread());
}
SocketStreamHandle::SocketStreamState SocketStreamHandle::state() const
Modified: trunk/Source/WebCore/platform/network/SocketStreamHandle.h (246404 => 246405)
--- trunk/Source/WebCore/platform/network/SocketStreamHandle.h 2019-06-13 16:05:27 UTC (rev 246404)
+++ trunk/Source/WebCore/platform/network/SocketStreamHandle.h 2019-06-13 18:14:31 UTC (rev 246405)
@@ -47,7 +47,7 @@
#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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes