Title: [233602] trunk/Source/WebCore
Revision
233602
Author
[email protected]
Date
2018-07-06 16:30:22 -0700 (Fri, 06 Jul 2018)

Log Message

Make RealtimeOutgoingVideoSource use DestructionThread::Main
https://bugs.webkit.org/show_bug.cgi?id=187402

Reviewed by Chris Dumez.

No change of behavior.

* platform/mediastream/RealtimeOutgoingVideoSource.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (233601 => 233602)


--- trunk/Source/WebCore/ChangeLog	2018-07-06 23:26:09 UTC (rev 233601)
+++ trunk/Source/WebCore/ChangeLog	2018-07-06 23:30:22 UTC (rev 233602)
@@ -1,3 +1,14 @@
+2018-07-06  Youenn Fablet  <[email protected]>
+
+        Make RealtimeOutgoingVideoSource use DestructionThread::Main
+        https://bugs.webkit.org/show_bug.cgi?id=187402
+
+        Reviewed by Chris Dumez.
+
+        No change of behavior.
+
+        * platform/mediastream/RealtimeOutgoingVideoSource.h:
+
 2018-07-06  Ryosuke Niwa  <[email protected]>
 
         Make HTMLMediaElement::remove*Track take a Ref<>&&

Modified: trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h (233601 => 233602)


--- trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h	2018-07-06 23:26:09 UTC (rev 233601)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h	2018-07-06 23:30:22 UTC (rev 233602)
@@ -42,7 +42,7 @@
 
 namespace WebCore {
 
-class RealtimeOutgoingVideoSource : public ThreadSafeRefCounted<RealtimeOutgoingVideoSource>, public webrtc::VideoTrackSourceInterface, private MediaStreamTrackPrivate::Observer {
+class RealtimeOutgoingVideoSource : public ThreadSafeRefCounted<RealtimeOutgoingVideoSource, WTF::DestructionThread::Main>, public webrtc::VideoTrackSourceInterface, private MediaStreamTrackPrivate::Observer {
 public:
     static Ref<RealtimeOutgoingVideoSource> create(Ref<MediaStreamTrackPrivate>&& videoSource);
     ~RealtimeOutgoingVideoSource() { stop(); }
@@ -54,10 +54,9 @@
     void AddRef() const final { ref(); }
     rtc::RefCountReleaseStatus Release() const final
     {
-        callOnMainThread([this] {
-            deref();
-        });
-        return rtc::RefCountReleaseStatus::kOtherRefsRemained;
+        auto result = hasOneRef() ? rtc::RefCountReleaseStatus::kDroppedLastRef : rtc::RefCountReleaseStatus::kOtherRefsRemained;
+        deref();
+        return result;
     }
 
     void setApplyRotation(bool shouldApplyRotation) { m_shouldApplyRotation = shouldApplyRotation; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to