mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset f556245d6da1 (bug 856848) for build bustage on a CLOSED TREE.
This commit is contained in:
parent
d1752a7396
commit
ce7f08851c
@ -45,12 +45,7 @@ static inline nsresult RUN_ON_THREAD(nsIEventTarget *thread, nsIRunnable *runnab
|
||||
bool on;
|
||||
nsresult rv;
|
||||
rv = thread->IsOnCurrentThread(&on);
|
||||
|
||||
// If the target thread has already shut down, we don't want to assert.
|
||||
if (rv != NS_ERROR_NOT_INITIALIZED) {
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if(!on) {
|
||||
return thread->Dispatch(runnable_ref, flags);
|
||||
|
@ -277,7 +277,7 @@ PeerConnectionImpl::PeerConnectionImpl()
|
||||
, mWindow(NULL)
|
||||
, mIdentity(NULL)
|
||||
, mSTSThread(NULL)
|
||||
, mMedia(NULL)
|
||||
, mMedia(new PeerConnectionMedia(this))
|
||||
, mNumAudioStreams(0)
|
||||
, mNumVideoStreams(0)
|
||||
, mHaveDataStream(false) {
|
||||
@ -526,8 +526,6 @@ PeerConnectionImpl::Initialize(IPeerConnectionObserver* aObserver,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mMedia = new PeerConnectionMedia(this);
|
||||
|
||||
// Connect ICE slots.
|
||||
mMedia->SignalIceGatheringCompleted.connect(this, &PeerConnectionImpl::IceGatheringCompleted);
|
||||
mMedia->SignalIceCompleted.connect(this, &PeerConnectionImpl::IceCompleted);
|
||||
|
@ -120,17 +120,12 @@ PeerConnectionImpl* PeerConnectionImpl::CreatePeerConnection()
|
||||
}
|
||||
|
||||
|
||||
PeerConnectionMedia::PeerConnectionMedia(PeerConnectionImpl *parent)
|
||||
: mParent(parent),
|
||||
mLocalSourceStreamsLock("PeerConnectionMedia.mLocalSourceStreamsLock"),
|
||||
mIceCtx(NULL),
|
||||
mDNSResolver(new mozilla::NrIceResolver()),
|
||||
mMainThread(mParent->GetMainThread()),
|
||||
mSTSThread(mParent->GetSTSThread()) {}
|
||||
|
||||
nsresult PeerConnectionMedia::Init(const std::vector<NrIceStunServer>& stun_servers,
|
||||
const std::vector<NrIceTurnServer>& turn_servers)
|
||||
{
|
||||
mMainThread = mParent->GetMainThread();
|
||||
mSTSThread = mParent->GetSTSThread();
|
||||
|
||||
// TODO(ekr@rtfm.com): need some way to set not offerer later
|
||||
// Looks like a bug in the NrIceCtx API.
|
||||
mIceCtx = NrIceCtx::Create("PC:" + mParent->GetHandle(), true);
|
||||
|
@ -230,7 +230,12 @@ RemoteSourceStreamInfo(already_AddRefed<DOMMediaStream> aMediaStream,
|
||||
|
||||
class PeerConnectionMedia : public sigslot::has_slots<> {
|
||||
public:
|
||||
PeerConnectionMedia(PeerConnectionImpl *parent);
|
||||
PeerConnectionMedia(PeerConnectionImpl *parent)
|
||||
: mParent(parent),
|
||||
mLocalSourceStreamsLock("PeerConnectionMedia.mLocalSourceStreamsLock"),
|
||||
mIceCtx(NULL),
|
||||
mDNSResolver(new mozilla::NrIceResolver()) {}
|
||||
|
||||
~PeerConnectionMedia() {}
|
||||
|
||||
nsresult Init(const std::vector<mozilla::NrIceStunServer>& stun_servers,
|
||||
|
@ -528,24 +528,25 @@ class ParsedSDP {
|
||||
|
||||
class SignalingAgent {
|
||||
public:
|
||||
SignalingAgent() : pc(nullptr) {
|
||||
cfg_.addStunServer("23.21.150.121", 3478);
|
||||
|
||||
pc = sipcc::PeerConnectionImpl::CreatePeerConnection();
|
||||
ASSERT_TRUE(pc);
|
||||
}
|
||||
SignalingAgent() : pc(nullptr) {}
|
||||
|
||||
~SignalingAgent() {
|
||||
mozilla::SyncRunnable::DispatchToThread(gThread,
|
||||
mozilla::SyncRunnable::DispatchToThread(pc->GetMainThread(),
|
||||
WrapRunnable(this, &SignalingAgent::Close));
|
||||
}
|
||||
|
||||
void Init_m(nsCOMPtr<nsIThread> thread)
|
||||
{
|
||||
pc = sipcc::PeerConnectionImpl::CreatePeerConnection();
|
||||
ASSERT_TRUE(pc);
|
||||
|
||||
pObserver = new TestObserver(pc);
|
||||
ASSERT_TRUE(pObserver);
|
||||
|
||||
ASSERT_EQ(pc->Initialize(pObserver, nullptr, cfg_, thread), NS_OK);
|
||||
sipcc::IceConfiguration cfg;
|
||||
cfg.addStunServer("23.21.150.121", 3478);
|
||||
ASSERT_EQ(pc->Initialize(pObserver, nullptr, cfg, thread), NS_OK);
|
||||
|
||||
}
|
||||
|
||||
void Init(nsCOMPtr<nsIThread> thread)
|
||||
@ -596,12 +597,10 @@ class SignalingAgent {
|
||||
|
||||
void Close()
|
||||
{
|
||||
if (pc) {
|
||||
cout << "Close" << endl;
|
||||
|
||||
pc->Close(false);
|
||||
pc = nullptr;
|
||||
}
|
||||
|
||||
// Shutdown is synchronous evidently.
|
||||
// ASSERT_TRUE(pObserver->WaitForObserverCall());
|
||||
@ -850,7 +849,6 @@ public:
|
||||
char* offer_;
|
||||
char* answer_;
|
||||
nsRefPtr<DOMMediaStream> domMediaStream_;
|
||||
sipcc::IceConfiguration cfg_;
|
||||
|
||||
private:
|
||||
void SDPSanityCheck(std::string sdp, uint32_t flags, bool offer)
|
||||
@ -996,19 +994,6 @@ class SignalingAgentTest : public ::testing::Test {
|
||||
return true;
|
||||
}
|
||||
|
||||
void CreateAgentNoInit() {
|
||||
ScopedDeletePtr<SignalingAgent> agent(new SignalingAgent());
|
||||
agents_.push_back(agent.forget());
|
||||
}
|
||||
|
||||
bool InitAgent(size_t i) {
|
||||
return agents_[i]->InitAllowFail(gThread);
|
||||
}
|
||||
|
||||
SignalingAgent *agent(size_t i) {
|
||||
return agents_[i];
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<SignalingAgent *> agents_;
|
||||
};
|
||||
@ -1987,11 +1972,6 @@ TEST_F(SignalingAgentTest, CreateUntilFailThenWait) {
|
||||
PR_Sleep(10000); // Wait to see if we crash
|
||||
}
|
||||
|
||||
// Test for bug 856433.
|
||||
TEST_F(SignalingAgentTest, CreateNoInit) {
|
||||
CreateAgentNoInit();
|
||||
}
|
||||
|
||||
/*
|
||||
* Test for Bug 843595
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user