From f45e5cef4164d36bf2d17b56ad1b2a6127ec1469 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Sat, 9 Feb 2013 11:10:31 -0500 Subject: [PATCH] Bug 837037: don't pass the NrIceCtx to IceGathering runnables r=ekr --- .../src/peerconnection/PeerConnectionImpl.cpp | 18 ++++++++---------- .../src/peerconnection/PeerConnectionImpl.h | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index 1fc55e54420d..b359c2ef3f9a 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -1270,22 +1270,21 @@ PeerConnectionImpl::GetHandle() void PeerConnectionImpl::IceGatheringCompleted(NrIceCtx *aCtx) { + (void) aCtx; // Do an async call here to unwind the stack. refptr keeps the PC alive. nsRefPtr pc(this); RUN_ON_THREAD(mThread, WrapRunnable(pc, - &PeerConnectionImpl::IceGatheringCompleted_m, - aCtx), + &PeerConnectionImpl::IceGatheringCompleted_m), NS_DISPATCH_NORMAL); } nsresult -PeerConnectionImpl::IceGatheringCompleted_m(NrIceCtx *aCtx) +PeerConnectionImpl::IceGatheringCompleted_m() { PC_AUTO_ENTER_API_CALL(false); - MOZ_ASSERT(aCtx); - CSFLogDebugS(logTag, __FUNCTION__ << ": ctx: " << static_cast(aCtx)); + CSFLogDebugS(logTag, __FUNCTION__); mIceState = kIceWaiting; @@ -1307,22 +1306,21 @@ PeerConnectionImpl::IceGatheringCompleted_m(NrIceCtx *aCtx) void PeerConnectionImpl::IceCompleted(NrIceCtx *aCtx) { + (void) aCtx; // Do an async call here to unwind the stack. refptr keeps the PC alive. nsRefPtr pc(this); RUN_ON_THREAD(mThread, WrapRunnable(pc, - &PeerConnectionImpl::IceCompleted_m, - aCtx), + &PeerConnectionImpl::IceCompleted_m), NS_DISPATCH_NORMAL); } nsresult -PeerConnectionImpl::IceCompleted_m(NrIceCtx *aCtx) +PeerConnectionImpl::IceCompleted_m() { PC_AUTO_ENTER_API_CALL(false); - MOZ_ASSERT(aCtx); - CSFLogDebugS(logTag, __FUNCTION__ << ": ctx: " << static_cast(aCtx)); + CSFLogDebugS(logTag, __FUNCTION__); mIceState = kIceConnected; diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h index 9429baa40f2c..97350a1ca9a5 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h @@ -259,8 +259,8 @@ private: void ShutdownMedia(bool isSynchronous); // ICE callbacks run on the right thread. - nsresult IceGatheringCompleted_m(NrIceCtx *aCtx); - nsresult IceCompleted_m(NrIceCtx *aCtx); + nsresult IceGatheringCompleted_m(); + nsresult IceCompleted_m(); // The role we are adopting Role mRole;