Bug 1006112 - Fixing regressions in signaling_unittests. r=ekr

This commit is contained in:
Martin Thomson 2014-05-05 14:19:00 +02:00
parent 8cc4ef2b69
commit fae54a6034
2 changed files with 14 additions and 4 deletions

View File

@ -653,6 +653,11 @@ nsresult MediaPipelineTransmit::Init() {
listener_->direct_connect_ = true;
}
#ifndef MOZILLA_INTERNAL_API
// this enables the unit tests that can't fiddle with principals and the like
listener_->SetEnabled(true);
#endif
return MediaPipeline::Init();
}

View File

@ -1330,12 +1330,17 @@ void CreateAnswer(sipcc::MediaConstraints& constraints, std::string offer,
mozilla::RefPtr<mozilla::MediaPipeline> GetMediaPipeline(
bool local, int stream, int track) {
sipcc::SourceStreamInfo *streamInfo;
sipcc::SourceStreamInfo* streamInfo;
if (local) {
streamInfo = pc->media()->GetLocalStream(stream);
mozilla::SyncRunnable::DispatchToThread(
gMainThread, WrapRunnableRet(
pc->media(), &sipcc::PeerConnectionMedia::GetLocalStream,
stream, &streamInfo));
} else {
streamInfo = pc->media()->GetRemoteStream(stream);
mozilla::SyncRunnable::DispatchToThread(
gMainThread, WrapRunnableRet(
pc->media(), &sipcc::PeerConnectionMedia::GetRemoteStream,
stream, &streamInfo));
}
if (!streamInfo) {