Chromium Code Reviews| Index: Source/modules/mediastream/RTCPeerConnection.cpp |
| diff --git a/Source/modules/mediastream/RTCPeerConnection.cpp b/Source/modules/mediastream/RTCPeerConnection.cpp |
| index 9fa043f41ad084136ab707cbb02866952bb0f86f..49d1453d212f511381397f97d12de9115b671ff7 100644 |
| --- a/Source/modules/mediastream/RTCPeerConnection.cpp |
| +++ b/Source/modules/mediastream/RTCPeerConnection.cpp |
| @@ -220,10 +220,9 @@ RTCPeerConnection::~RTCPeerConnection() |
| // We are assuming that a wrapper is always created when RTCPeerConnection is created. |
| ASSERT(m_closed || m_stopped); |
| - // FIXME: Oilpan: We can't call stop here since it touches m_dataChannels. |
| - // Another way to ensure that data channels are stopped at RTCPeerConnection |
| - // destruction is needed. |
| +#if !ENABLE(OILPAN) |
| stop(); |
| +#endif |
| } |
| void RTCPeerConnection::createOffer(PassOwnPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback, const Dictionary& mediaConstraints, ExceptionState& exceptionState) |
| @@ -489,6 +488,7 @@ MediaStream* RTCPeerConnection::getStreamById(const String& streamId) |
| void RTCPeerConnection::getStats(PassOwnPtr<RTCStatsCallback> successCallback, PassRefPtr<MediaStreamTrack> selector) |
| { |
| + ASSERT(m_peerHandler); |
|
haraken
2014/06/18 09:17:09
What is this ASSERT for?
keishi
2014/06/18 10:48:00
Removed.
|
| RefPtr<RTCStatsRequest> statsRequest = RTCStatsRequestImpl::create(executionContext(), this, successCallback, selector); |
| // FIXME: Add passing selector as part of the statsRequest. |
| m_peerHandler->getStats(statsRequest.release()); |
| @@ -515,7 +515,7 @@ PassRefPtrWillBeRawPtr<RTCDataChannel> RTCPeerConnection::createDataChannel(Stri |
| options.get("protocol", protocolString); |
| init.protocol = protocolString; |
| - RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), m_peerHandler.get(), label, init, exceptionState); |
| + RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), this, m_peerHandler.get(), label, init, exceptionState); |
| if (exceptionState.hadException()) |
| return nullptr; |
| m_dataChannels.append(channel); |
| @@ -649,7 +649,7 @@ void RTCPeerConnection::didAddRemoteDataChannel(blink::WebRTCDataChannelHandler* |
| if (m_signalingState == SignalingStateClosed) |
| return; |
| - RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), adoptPtr(handler)); |
| + RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), this, adoptPtr(handler)); |
| m_dataChannels.append(channel); |
| scheduleDispatchEvent(RTCDataChannelEvent::create(EventTypeNames::datachannel, false, false, channel.release())); |