Bug 1411977 - Part 6: Don't unwind the stack when firing onsignalingstatechange. r?drno
MozReview-Commit-ID: 5qAlxKFzKQk
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -3207,23 +3207,19 @@ void PeerConnectionImpl::IceConnectionSt
default:
MOZ_ASSERT_UNREACHABLE("Unexpected mIceConnectionState!");
}
RefPtr<PeerConnectionObserver> pco = do_QueryObjectReferent(mPCObserver);
if (!pco) {
return;
}
+
WrappableJSErrorResult rv;
- RUN_ON_THREAD(mThread,
- WrapRunnable(pco,
- &PeerConnectionObserver::OnStateChange,
- PCObserverStateType::IceConnectionState,
- rv, static_cast<JSCompartment*>(nullptr)),
- NS_DISPATCH_NORMAL);
+ pco->OnStateChange(PCObserverStateType::IceConnectionState, rv);
}
void
PeerConnectionImpl::IceGatheringStateChange(
NrIceCtx* ctx,
NrIceCtx::GatheringState state)
{
PC_AUTO_ENTER_API_CALL_VOID_RETURN(false);