Backed out changeset 70872c020944 (bug 834383) speculatively to see if it fixes the random timeouts in test_peerConnection_basicAudio.html and friends.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2013-01-31 20:24:18 -05:00
parent 0a9157ef27
commit c66b40cd52
5 changed files with 5 additions and 49 deletions

View File

@ -990,14 +990,9 @@ static short vcmGetDtlsIdentity_m(const char *peerconnection,
unsigned char digest[TransportLayerDtls::kMaxDigestLength];
size_t digest_len;
mozilla::RefPtr<DtlsIdentity> id = pc.impl()->GetIdentity();
if (!id) {
return VCM_ERROR;
}
nsresult res = id->ComputeFingerprint("sha-256", digest, sizeof(digest),
&digest_len);
nsresult res = pc.impl()->GetIdentity()->ComputeFingerprint("sha-256", digest,
sizeof(digest),
&digest_len);
if (!NS_SUCCEEDED(res)) {
CSFLogError( logTag, "%s: Could not compute identity fingerprint", __FUNCTION__);
return VCM_ERROR;
@ -2645,11 +2640,7 @@ vcmCreateTransportFlow(sipcc::PeerConnectionImpl *pc, int level, bool rtcp,
// TODO(ekr@rtfm.com): implement the actpass logic above.
dtls->SetRole(pc->GetRole() == sipcc::PeerConnectionImpl::kRoleOfferer ?
TransportLayerDtls::SERVER : TransportLayerDtls::CLIENT);
mozilla::RefPtr<DtlsIdentity> pcid = pc->GetIdentity();
if (!pcid) {
return nullptr;
}
dtls->SetIdentity(pcid);
dtls->SetIdentity(pc->GetIdentity());
unsigned char remote_digest[TransportLayerDtls::kMaxDigestLength];
size_t digest_len;

View File

@ -138,10 +138,6 @@ PeerConnectionCtx* PeerConnectionCtx::GetInstance() {
return gInstance;
}
bool PeerConnectionCtx::isActive() {
return gInstance;
}
void PeerConnectionCtx::Destroy() {
CSFLogDebug(logTag, "%s", __FUNCTION__);

View File

@ -31,7 +31,6 @@ class PeerConnectionCtx : public CSF::CC_Observer {
public:
static nsresult InitializeGlobal(nsIThread *mainThread);
static PeerConnectionCtx* GetInstance();
static bool isActive();
static void Destroy();
// Implementations of CC_Observer methods

View File

@ -242,19 +242,9 @@ PeerConnectionImpl::PeerConnectionImpl()
PeerConnectionImpl::~PeerConnectionImpl()
{
PC_AUTO_ENTER_API_CALL_NO_CHECK();
if (PeerConnectionCtx::isActive()) {
PeerConnectionCtx::GetInstance()->mPeerConnections.erase(mHandle);
} else {
CSFLogErrorS(logTag, "PeerConnectionCtx is already gone. Ignoring...");
}
PeerConnectionCtx::GetInstance()->mPeerConnections.erase(mHandle);
CloseInt(false);
#ifdef MOZILLA_INTERNAL_API
// Deregister as an NSS Shutdown Object
shutdown(calledFromObject);
#endif
// Since this and Initialize() occur on MainThread, they can't both be
// running at once
@ -1145,20 +1135,6 @@ PeerConnectionImpl::ShutdownMedia(bool aIsSynchronous)
aIsSynchronous ? NS_DISPATCH_SYNC : NS_DISPATCH_NORMAL);
}
#ifdef MOZILLA_INTERNAL_API
// If NSS is shutting down, then we need to get rid of the DTLS
// identity right now; otherwise, we'll cause wreckage when we do
// finally deallocate it in our destructor.
void
PeerConnectionImpl::virtualDestroyNSSReference()
{
MOZ_ASSERT(NS_IsMainThread());
CSFLogDebugS(logTag, __FUNCTION__ << ": "
<< "NSS shutting down; freeing our DtlsIdentity.");
mIdentity = nullptr;
}
#endif
void
PeerConnectionImpl::onCallEvent(ccapi_call_event_e aCallEvent,
CSF::CC_CallPtr aCall, CSF::CC_CallInfoPtr aInfo)

View File

@ -34,7 +34,6 @@
#include "VideoUtils.h"
#include "ImageLayers.h"
#include "VideoSegment.h"
#include "nsNSSShutDown.h"
#else
namespace mozilla {
class DataChannel;
@ -99,7 +98,6 @@ class PeerConnectionWrapper;
class PeerConnectionImpl MOZ_FINAL : public IPeerConnection,
#ifdef MOZILLA_INTERNAL_API
public mozilla::DataChannelConnection::DataConnectionListener,
public nsNSSShutDownObject,
#endif
public sigslot::has_slots<>
{
@ -251,10 +249,6 @@ private:
return true;
}
#ifdef MOZILLA_INTERNAL_API
void virtualDestroyNSSReference() MOZ_FINAL;
#endif
// Shut down media. Called on any thread.
void ShutdownMedia(bool isSynchronous);