Bug 820559: Workaround old Android gcc build-bustage by casting anonymous enum template args to ints, r=ekr
authorDan Mosedale <dmose@mozilla.org>
Wed, 12 Dec 2012 10:15:49 -0800
changeset 115812 7ef53b8f1ff60cd7f796304cd3dc822ae7a653a2
parent 115811 29df94c927f89d070a77168de0d71b6588f53b1f
child 115813 cd712828cb475635cd849de33cad6a15f499b6ed
push id24028
push useremorley@mozilla.com
push dateThu, 13 Dec 2012 15:56:02 +0000
treeherderautoland@9db79b97abbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekr
bugs820559
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 820559: Workaround old Android gcc build-bustage by casting anonymous enum template args to ints, r=ekr
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -1023,17 +1023,18 @@ PeerConnectionImpl::ChangeReadyState(Pee
 {
   PC_AUTO_ENTER_API_CALL_NO_CHECK();
   mReadyState = aReadyState;
 
   // Note that we are passing an nsRefPtr<IPeerConnectionObserver> which
   // keeps the observer live.
   RUN_ON_THREAD(mThread, WrapRunnable(mPCObserver,
                                       &IPeerConnectionObserver::OnStateChange,
-                                      IPeerConnectionObserver::kReadyState),
+                                      // static_cast needed to work around old Android NDK r5c compiler
+                                      static_cast<int>(IPeerConnectionObserver::kReadyState)),
     NS_DISPATCH_NORMAL);
 }
 
 PeerConnectionWrapper::PeerConnectionWrapper(const std::string& handle)
     : impl_(nullptr) {
   if (PeerConnectionCtx::GetInstance()->mPeerConnections.find(handle) ==
     PeerConnectionCtx::GetInstance()->mPeerConnections.end()) {
     return;
@@ -1071,17 +1072,18 @@ PeerConnectionImpl::IceGatheringComplete
 
   mIceState = kIceWaiting;
 
 #ifdef MOZILLA_INTERNAL_API
   if (mPCObserver) {
     RUN_ON_THREAD(mThread,
                   WrapRunnable(mPCObserver,
                                &IPeerConnectionObserver::OnStateChange,
-                               IPeerConnectionObserver::kIceState),
+                               // static_cast required to work around old C++ compiler on Android NDK r5c
+                               static_cast<int>(IPeerConnectionObserver::kIceState)),
                   NS_DISPATCH_NORMAL);
   }
 #endif
 }
 
 void
 PeerConnectionImpl::IceCompleted(NrIceCtx *aCtx)
 {
@@ -1102,17 +1104,18 @@ PeerConnectionImpl::IceCompleted_m(NrIce
 
   mIceState = kIceConnected;
 
 #ifdef MOZILLA_INTERNAL_API
   if (mPCObserver) {
     RUN_ON_THREAD(mThread,
                   WrapRunnable(mPCObserver,
                                &IPeerConnectionObserver::OnStateChange,
-                               IPeerConnectionObserver::kIceState),
+                               // static_cast required to work around old C++ compiler on Android NDK r5c
+			       static_cast<int>(IPeerConnectionObserver::kIceState)),
                   NS_DISPATCH_NORMAL);
   }
 #endif
 }
 
 void
 PeerConnectionImpl::IceStreamReady(NrIceMediaStream *aStream)
 {