Bug 1048261: Fix SetDtlsConnected() r=bwc

This commit is contained in:
Randell Jesup 2014-08-04 16:31:45 -04:00
parent f8e5caee0f
commit 8d9058b81e

View File

@ -543,7 +543,8 @@ PeerConnectionMedia::DtlsConnected(TransportLayer *dtlsLayer,
bool privacyRequested = false;
// TODO (Bug 952678) set privacy mode, ask the DTLS layer about that
GetMainThread()->Dispatch(
WrapRunnable(mParent, &PeerConnectionImpl::SetDtlsConnected, privacyRequested),
WrapRunnable(nsRefPtr<PeerConnectionImpl>(mParent),
&PeerConnectionImpl::SetDtlsConnected, privacyRequested),
NS_DISPATCH_NORMAL);
}
@ -749,12 +750,13 @@ RefPtr<MediaPipeline> SourceStreamInfo::GetPipelineByLevel_m(int level) {
bool RemoteSourceStreamInfo::SetUsingBundle_m(int aLevel, bool decision) {
ASSERT_ON_THREAD(mParent->GetMainThread());
RefPtr<MediaPipeline> pipeline(GetPipelineByLevel_m(aLevel));
// Avoid adding and dropping an extra ref
MediaPipeline *pipeline = GetPipelineByLevel_m(aLevel);
if (pipeline) {
RUN_ON_THREAD(mParent->GetSTSThread(),
WrapRunnable(
pipeline,
RefPtr<MediaPipeline>(pipeline),
&MediaPipeline::SetUsingBundle_s,
decision
),