Changeset 233857 in webkit


Ignore:
Timestamp:
Jul 16, 2018 11:55:08 AM (6 years ago)
Author:
Chris Dumez
Message:

Make sure LibWebRTCMediaEndpoint is always destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=187702

Reviewed by Youenn Fablet.

Make sure LibWebRTCMediaEndpoint is always constructed and destructed on the main thread since
it has a Timer data member and it would not be safe otherwise. LibWebRTCMediaEndpoint is
ThreadSafeRefCounted and frequently passed to other threads.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r233853 r233857  
     12018-07-16  Chris Dumez  <cdumez@apple.com>
     2
     3        Make sure LibWebRTCMediaEndpoint is always destroyed on the main thread
     4        https://bugs.webkit.org/show_bug.cgi?id=187702
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Make sure LibWebRTCMediaEndpoint is always constructed and destructed on the main thread since
     9        it has a Timer data member and it would not be safe otherwise. LibWebRTCMediaEndpoint is
     10        ThreadSafeRefCounted and frequently passed to other threads.
     11
     12        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
     13        (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
     14        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
     15
    1162018-07-16  Sihui Liu  <sihui_liu@apple.com>
    217
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp

    r233122 r233857  
    7575#endif
    7676{
     77    ASSERT(isMainThread());
    7778    ASSERT(client.factory());
    7879}
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h

    r231512 r233857  
    5858
    5959class LibWebRTCMediaEndpoint
    60     : public ThreadSafeRefCounted<LibWebRTCMediaEndpoint>
     60    : public ThreadSafeRefCounted<LibWebRTCMediaEndpoint, WTF::DestructionThread::Main>
    6161    , private webrtc::PeerConnectionObserver
    6262    , private webrtc::RTCStatsCollectorCallback
Note: See TracChangeset for help on using the changeset viewer.