Title: [237781] trunk/Source/WebCore
Revision
237781
Author
[email protected]
Date
2018-11-04 07:30:31 -0800 (Sun, 04 Nov 2018)

Log Message

RealtimeOutgoingAudioSource should use DestructionThread::Main
https://bugs.webkit.org/show_bug.cgi?id=191230

Reviewed by Eric Carlson.

Covered by imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-replaceTrack.https.html
that should no longer crash in debug.

* platform/mediastream/RealtimeOutgoingAudioSource.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (237780 => 237781)


--- trunk/Source/WebCore/ChangeLog	2018-11-04 15:05:43 UTC (rev 237780)
+++ trunk/Source/WebCore/ChangeLog	2018-11-04 15:30:31 UTC (rev 237781)
@@ -1,5 +1,17 @@
 2018-11-04  Youenn Fablet  <[email protected]>
 
+        RealtimeOutgoingAudioSource should use DestructionThread::Main
+        https://bugs.webkit.org/show_bug.cgi?id=191230
+
+        Reviewed by Eric Carlson.
+
+        Covered by imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-replaceTrack.https.html
+        that should no longer crash in debug.
+
+        * platform/mediastream/RealtimeOutgoingAudioSource.h:
+
+2018-11-04  Youenn Fablet  <[email protected]>
+
         IDB should allow storing RTCCertificate
         https://bugs.webkit.org/show_bug.cgi?id=191077
 

Modified: trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h (237780 => 237781)


--- trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h	2018-11-04 15:05:43 UTC (rev 237780)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingAudioSource.h	2018-11-04 15:30:31 UTC (rev 237781)
@@ -50,7 +50,7 @@
 
 namespace WebCore {
 
-class RealtimeOutgoingAudioSource : public ThreadSafeRefCounted<RealtimeOutgoingAudioSource>, public webrtc::AudioSourceInterface, private MediaStreamTrackPrivate::Observer {
+class RealtimeOutgoingAudioSource : public ThreadSafeRefCounted<RealtimeOutgoingAudioSource, WTF::DestructionThread::Main>, public webrtc::AudioSourceInterface, private MediaStreamTrackPrivate::Observer {
 public:
     static Ref<RealtimeOutgoingAudioSource> create(Ref<MediaStreamTrackPrivate>&& audioSource);
 
@@ -77,10 +77,9 @@
     void AddRef() const final { ref(); }
     rtc::RefCountReleaseStatus Release() const final
     {
-        callOnMainThread([this] {
-            deref();
-        });
-        return rtc::RefCountReleaseStatus::kOtherRefsRemained;
+        auto result = refCount() - 1;
+        deref();
+        return result ? rtc::RefCountReleaseStatus::kOtherRefsRemained : rtc::RefCountReleaseStatus::kDroppedLastRef;
     }
 
     SourceState state() const final { return kLive; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to