Title: [238232] trunk/Source/WebCore
Revision
238232
Author
[email protected]
Date
2018-11-15 10:25:49 -0800 (Thu, 15 Nov 2018)

Log Message

Modernize RTCPeerConnection handling of pendingActivity
https://bugs.webkit.org/show_bug.cgi?id=191661

Reviewed by Eric Carlson.

makePendingActivity is the modern way to handle set/unset of pending activity.
No change of behavior.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
(WebCore::RTCPeerConnection::doStop):
* Modules/mediastream/RTCPeerConnection.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (238231 => 238232)


--- trunk/Source/WebCore/ChangeLog	2018-11-15 18:20:20 UTC (rev 238231)
+++ trunk/Source/WebCore/ChangeLog	2018-11-15 18:25:49 UTC (rev 238232)
@@ -1,3 +1,18 @@
+2018-11-15  Youenn Fablet  <[email protected]>
+
+        Modernize RTCPeerConnection handling of pendingActivity
+        https://bugs.webkit.org/show_bug.cgi?id=191661
+
+        Reviewed by Eric Carlson.
+
+        makePendingActivity is the modern way to handle set/unset of pending activity.
+        No change of behavior.
+
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::create):
+        (WebCore::RTCPeerConnection::doStop):
+        * Modules/mediastream/RTCPeerConnection.h:
+
 2018-11-15  Keith Rollin  <[email protected]>
 
         Delete old .xcfilelist files

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (238231 => 238232)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2018-11-15 18:20:20 UTC (rev 238231)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2018-11-15 18:25:49 UTC (rev 238232)
@@ -69,7 +69,7 @@
     // RTCPeerConnection may send events at about any time during its lifetime.
     // Let's make it uncollectable until the pc is closed by JS or the page stops it.
     if (!peerConnection->isClosed()) {
-        peerConnection->setPendingActivity(peerConnection.ptr());
+        peerConnection->m_pendingActivity = peerConnection->makePendingActivity(peerConnection.get());
         if (auto* page = downcast<Document>(context).page())
             peerConnection->registerToController(page->rtcController());
     }
@@ -463,8 +463,7 @@
     m_isStopped = true;
 
     m_backend->stop();
-
-    unsetPendingActivity(this);
+    m_pendingActivity = nullptr;
 }
 
 void RTCPeerConnection::registerToController(RTCController& controller)

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (238231 => 238232)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2018-11-15 18:20:20 UTC (rev 238231)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2018-11-15 18:25:49 UTC (rev 238232)
@@ -228,6 +228,7 @@
     RTCConfiguration m_configuration;
     RTCController* m_controller { nullptr };
     Vector<RefPtr<RTCCertificate>> m_certificates;
+    RefPtr<PendingActivity<RTCPeerConnection>> m_pendingActivity;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to