Bug 884061 - Part 3o: Use NS_DECL_THREADSAFE_ISUPPORTS in media/, r=abr

--HG--
extra : rebase_source : cdad785f54f50c012ea4f904369b120656c68a55
This commit is contained in:
Joshua Cranmer 2013-07-18 21:23:32 -05:00
parent 41b9daad54
commit b9c7101910
15 changed files with 23 additions and 24 deletions

View File

@ -116,7 +116,7 @@ extern "C" {
// Implement the nsISupports ref counting
namespace mozilla {
NS_IMPL_THREADSAFE_ISUPPORTS0(NrSocket)
NS_IMPL_ISUPPORTS0(NrSocket)
// The nsASocket callbacks

View File

@ -84,7 +84,7 @@ public:
virtual uint64_t ByteCountReceived() { return 0; }
// nsISupports methods
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
// Implementations of the async_event APIs
int async_wait(int how, NR_async_cb cb, void *cb_arg,

View File

@ -70,7 +70,8 @@ namespace mozilla {
class nrappkitTimerCallback : public nsITimerCallback
{
public:
NS_DECL_ISUPPORTS
// We're going to release ourself in the callback, so we need to be threadsafe
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSITIMERCALLBACK
nrappkitTimerCallback(NR_async_cb cb, void *cb_arg,
@ -89,8 +90,7 @@ protected:
int line_;
};
// We're going to release ourself in the callback, so we need to be threadsafe
NS_IMPL_THREADSAFE_ISUPPORTS1(nrappkitTimerCallback, nsITimerCallback)
NS_IMPL_ISUPPORTS1(nrappkitTimerCallback, nsITimerCallback)
NS_IMETHODIMP nrappkitTimerCallback::Notify(nsITimer *timer) {
r_log(LOG_GENERIC, LOG_DEBUG, "Timer callback fired (set in %s:%d)",

View File

@ -212,5 +212,5 @@ int NrIceResolver::PendingResolution::cancel() {
return 0;
}
NS_IMPL_THREADSAFE_ISUPPORTS1(NrIceResolver::PendingResolution, nsIDNSListener);
NS_IMPL_ISUPPORTS1(NrIceResolver::PendingResolution, nsIDNSListener);
} // End of namespace mozilla

View File

@ -98,7 +98,7 @@ class NrIceResolver
nsresult status);
int cancel();
nsCOMPtr<nsICancelable> request_;
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
private:
nsCOMPtr<nsIEventTarget> thread_;

View File

@ -49,7 +49,7 @@ class SendPeriodic : public nsITimerCallback {
to_send_(to_send) {}
virtual ~SendPeriodic() {}
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSITIMERCALLBACK
protected:
@ -57,7 +57,7 @@ class SendPeriodic : public nsITimerCallback {
int to_send_;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(SendPeriodic, nsITimerCallback)
NS_IMPL_ISUPPORTS1(SendPeriodic, nsITimerCallback)
class TransportTestPeer : public sigslot::has_slots<> {

View File

@ -108,8 +108,7 @@ void TransportLayerLoopback::DeliverPackets() {
}
}
NS_IMPL_THREADSAFE_ISUPPORTS1(TransportLayerLoopback::Deliverer,
nsITimerCallback)
NS_IMPL_ISUPPORTS1(TransportLayerLoopback::Deliverer, nsITimerCallback)
NS_IMETHODIMP TransportLayerLoopback::Deliverer::Notify(nsITimer *timer) {
if (!layer_)

View File

@ -115,7 +115,7 @@ class TransportLayerLoopback : public TransportLayer {
layer_ = nullptr;
}
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSITIMERCALLBACK
private:

View File

@ -112,5 +112,5 @@ void TransportLayerPrsock::OnSocketReady(PRFileDesc *fd, int16_t outflags) {
}
}
NS_IMPL_THREADSAFE_ISUPPORTS0(TransportLayerPrsock::SocketHandler)
NS_IMPL_ISUPPORTS0(TransportLayerPrsock::SocketHandler)
} // close namespace

View File

@ -86,7 +86,7 @@ class TransportLayerPrsock : public TransportLayer {
virtual uint64_t ByteCountReceived() { return 0; }
// nsISupports methods
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
private:
TransportLayerPrsock *prsock_;

View File

@ -316,7 +316,7 @@ private:
nsRefPtr<RemoteSourceStreamInfo> mRemoteStream;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(PeerConnectionImpl, IPeerConnection)
NS_IMPL_ISUPPORTS1(PeerConnectionImpl, IPeerConnection)
PeerConnectionImpl::PeerConnectionImpl()
: mRole(kRoleUnknown)

View File

@ -179,7 +179,7 @@ public:
kInternalError = 9
};
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_IPEERCONNECTION
static PeerConnectionImpl* CreatePeerConnection();

View File

@ -91,7 +91,7 @@ Fake_MediaPeriodic(Fake_MediaStream *aStream) : mStream(aStream),
int GetTimesCalled() { return mCount; }
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSITIMERCALLBACK
protected:
@ -192,7 +192,7 @@ public:
mMediaStream->Stop();
}
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
static already_AddRefed<Fake_DOMMediaStream>
CreateSourceStream(nsIDOMWindow* aWindow, uint32_t aHintContents) {

View File

@ -13,7 +13,7 @@
static const int AUDIO_BUFFER_SIZE = 1600;
static const int NUM_CHANNELS = 2;
NS_IMPL_THREADSAFE_ISUPPORTS1(Fake_DOMMediaStream, nsIDOMMediaStream)
NS_IMPL_ISUPPORTS1(Fake_DOMMediaStream, nsIDOMMediaStream)
// Fake_SourceMediaStream
nsresult Fake_SourceMediaStream::Start() {
@ -106,7 +106,7 @@ void Fake_AudioStreamSource::Periodic() {
// Fake_MediaPeriodic
NS_IMPL_THREADSAFE_ISUPPORTS1(Fake_MediaPeriodic, nsITimerCallback)
NS_IMPL_ISUPPORTS1(Fake_MediaPeriodic, nsITimerCallback)
NS_IMETHODIMP
Fake_MediaPeriodic::Notify(nsITimer *timer) {

View File

@ -177,7 +177,7 @@ public:
std::vector<DOMMediaStream *> GetStreams() { return streams; }
NS_DECL_ISUPPORTS
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_IPEERCONNECTIONOBSERVER
ResponseState state;
@ -193,9 +193,9 @@ private:
std::vector<DOMMediaStream *> streams;
};
NS_IMPL_THREADSAFE_ISUPPORTS2(TestObserver,
IPeerConnectionObserver,
nsISupportsWeakReference)
NS_IMPL_ISUPPORTS2(TestObserver,
IPeerConnectionObserver,
nsISupportsWeakReference)
NS_IMETHODIMP
TestObserver::OnCreateOfferSuccess(const char* offer)