Title: [233947] branches/safari-606-branch/Source/WebCore
Revision
233947
Author
bshaf...@apple.com
Date
2018-07-18 18:59:16 -0700 (Wed, 18 Jul 2018)

Log Message

Cherry-pick r233857. rdar://problem/42345036

    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:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233857 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-606-branch/Source/WebCore/ChangeLog (233946 => 233947)


--- branches/safari-606-branch/Source/WebCore/ChangeLog	2018-07-19 01:59:12 UTC (rev 233946)
+++ branches/safari-606-branch/Source/WebCore/ChangeLog	2018-07-19 01:59:16 UTC (rev 233947)
@@ -1,5 +1,40 @@
 2018-07-18  Babak Shafiei  <bshaf...@apple.com>
 
+        Cherry-pick r233857. rdar://problem/42345036
+
+    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:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-07-16  Chris Dumez  <cdu...@apple.com>
+
+            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-18  Babak Shafiei  <bshaf...@apple.com>
+
         Cherry-pick r233853. rdar://problem/42344991
 
     IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins

Modified: branches/safari-606-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (233946 => 233947)


--- branches/safari-606-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp	2018-07-19 01:59:12 UTC (rev 233946)
+++ branches/safari-606-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp	2018-07-19 01:59:16 UTC (rev 233947)
@@ -74,6 +74,7 @@
     , m_logIdentifier(peerConnection.logIdentifier())
 #endif
 {
+    ASSERT(isMainThread());
     ASSERT(client.factory());
 }
 

Modified: branches/safari-606-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h (233946 => 233947)


--- branches/safari-606-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h	2018-07-19 01:59:12 UTC (rev 233946)
+++ branches/safari-606-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h	2018-07-19 01:59:16 UTC (rev 233947)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to