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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238232
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-11-15 Youenn Fablet <youenn@apple.com>
+
+ 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 <krollin@apple.com>
Delete old .xcfilelist files
// 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());
}
m_isStopped = true;
m_backend->stop();
-
- unsetPendingActivity(this);
+ m_pendingActivity = nullptr;
}
void RTCPeerConnection::registerToController(RTCController& controller)
RTCConfiguration m_configuration;
RTCController* m_controller { nullptr };
Vector<RefPtr<RTCCertificate>> m_certificates;
+ RefPtr<PendingActivity<RTCPeerConnection>> m_pendingActivity;
};
} // namespace WebCore