Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (233856 => 233857)
--- trunk/Source/WebCore/ChangeLog 2018-07-16 18:52:22 UTC (rev 233856)
+++ trunk/Source/WebCore/ChangeLog 2018-07-16 18:55:08 UTC (rev 233857)
@@ -1,3 +1,18 @@
+2018-07-16 Chris Dumez <[email protected]>
+
+ 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:
+
2018-07-16 Sihui Liu <[email protected]>
IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (233856 => 233857)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2018-07-16 18:52:22 UTC (rev 233856)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2018-07-16 18:55:08 UTC (rev 233857)
@@ -74,6 +74,7 @@
, m_logIdentifier(peerConnection.logIdentifier())
#endif
{
+ ASSERT(isMainThread());
ASSERT(client.factory());
}
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h (233856 => 233857)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h 2018-07-16 18:52:22 UTC (rev 233856)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h 2018-07-16 18:55:08 UTC (rev 233857)
@@ -57,7 +57,7 @@
class RTCSessionDescription;
class LibWebRTCMediaEndpoint
- : public ThreadSafeRefCounted<LibWebRTCMediaEndpoint>
+ : public ThreadSafeRefCounted<LibWebRTCMediaEndpoint, WTF::DestructionThread::Main>
, private webrtc::PeerConnectionObserver
, private webrtc::RTCStatsCollectorCallback
#if !RELEASE_LOG_DISABLED
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
