Chromium Code Reviews| 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 85cb675df52591ff30a073a66e2606b8d9868286..df9d88ec758b195311ddb78892e82de4f0d8d9d7 100644 |
| --- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp |
| +++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp |
| @@ -521,6 +521,9 @@ RTCPeerConnection::RTCPeerConnection(ExecutionContext* context, |
| NotSupportedError, "Failed to initialize native PeerConnection."); |
| return; |
| } |
| + |
| + m_connectionHandleForScheduler = |
| + document->frame()->frameScheduler()->onActiveConnectionCreated(); |
|
haraken
2017/02/10 16:51:20
Another possible API would be to use an observer p
altimin
2017/02/10 16:57:00
I would argue that you still need to notify the sc
|
| } |
| RTCPeerConnection::~RTCPeerConnection() { |
| @@ -1352,6 +1355,8 @@ void RTCPeerConnection::releasePeerConnectionHandler() { |
| m_dispatchScheduledEventRunner->stop(); |
| m_peerHandler.reset(); |
| + |
| + m_connectionHandleForScheduler.reset(); |
| } |
| void RTCPeerConnection::closePeerConnection() { |
| @@ -1426,6 +1431,8 @@ void RTCPeerConnection::closeInternal() { |
| Document* document = toDocument(getExecutionContext()); |
| HostsUsingFeatures::countAnyWorld( |
| *document, HostsUsingFeatures::Feature::RTCPeerConnectionUsed); |
| + |
| + m_connectionHandleForScheduler.reset(); |
| } |
| void RTCPeerConnection::scheduleDispatchEvent(Event* event) { |