Changeset 246405 in webkit


Ignore:
Timestamp:
Jun 13, 2019 11:14:31 AM (5 years ago)
Author:
youenn@apple.com
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:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246404 r246405  
     12019-06-13  Youenn Fablet  <youenn@apple.com>
     2
     3        SocketStreamHandle should not be destroyed in a background thread
     4        https://bugs.webkit.org/show_bug.cgi?id=198781
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Make sure to destroy SocketStreamHandle on the main thread since it owns an URL created on the main thread.
     9        Covered by WPT websocket tests from https://bugs.webkit.org/show_bug.cgi?id=198774.
     10
     11        * platform/network/SocketStreamHandle.cpp:
     12        (WebCore::SocketStreamHandle::SocketStreamHandle):
     13        * platform/network/SocketStreamHandle.h:
     14
    1152019-06-13  Antoine Quint  <graouts@apple.com>
    216
  • trunk/Source/WebCore/platform/network/SocketStreamHandle.cpp

    r239427 r246405  
    4343    , m_state(Connecting)
    4444{
     45    ASSERT(isMainThread());
    4546}
    4647
  • trunk/Source/WebCore/platform/network/SocketStreamHandle.h

    r239427 r246405  
    4848} SourceApplicationAuditToken;
    4949
    50 class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle> {
     50class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle, WTF::DestructionThread::Main> {
    5151public:
    5252    enum SocketStreamState { Connecting, Open, Closing, Closed };
Note: See TracChangeset for help on using the changeset viewer.