Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp

Issue 2692013002: [scheduler] Plumb information about active webrtc connections to scheduler (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
index 7bcd1d2e8343cd77a625cca2e4ddfa0dbcfa6256..f43775ef8786494f1dd7ecf39eb99ff3ed3f37ed 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
@@ -520,6 +520,9 @@ RTCPeerConnection::RTCPeerConnection(ExecutionContext* context,
NotSupportedError, "Failed to initialize native PeerConnection.");
return;
}
+
+ m_connectionHandleForScheduler =
+ document->frame()->frameScheduler()->onActiveConnectionCreated();
}
RTCPeerConnection::~RTCPeerConnection() {
@@ -1341,6 +1344,8 @@ void RTCPeerConnection::releasePeerConnectionHandler() {
m_dispatchScheduledEventRunner->stop();
m_peerHandler.reset();
+
+ m_connectionHandleForScheduler.reset();
}
void RTCPeerConnection::closePeerConnection() {
@@ -1415,6 +1420,8 @@ void RTCPeerConnection::closeInternal() {
Document* document = toDocument(getExecutionContext());
HostsUsingFeatures::countAnyWorld(
*document, HostsUsingFeatures::Feature::RTCPeerConnectionUsed);
+
+ m_connectionHandleForScheduler.reset();
}
void RTCPeerConnection::scheduleDispatchEvent(Event* event) {

Powered by Google App Engine
This is Rietveld 408576698