Bug 1119267 - Mark virtual overridden functions as MOZ_OVERRIDE in media; r=jesup

This commit is contained in:
Ehsan Akhgari 2015-01-08 10:17:13 -05:00
parent c50516747c
commit 02203cdfb4
5 changed files with 53 additions and 53 deletions

View File

@ -133,33 +133,33 @@ public:
NrSocket() : fd_(nullptr) {}
// Implement nsASocket
virtual void OnSocketReady(PRFileDesc *fd, int16_t outflags);
virtual void OnSocketDetached(PRFileDesc *fd);
virtual void IsLocal(bool *aIsLocal);
virtual uint64_t ByteCountSent() { return 0; }
virtual uint64_t ByteCountReceived() { return 0; }
virtual void OnSocketReady(PRFileDesc *fd, int16_t outflags) MOZ_OVERRIDE;
virtual void OnSocketDetached(PRFileDesc *fd) MOZ_OVERRIDE;
virtual void IsLocal(bool *aIsLocal) MOZ_OVERRIDE;
virtual uint64_t ByteCountSent() MOZ_OVERRIDE { return 0; }
virtual uint64_t ByteCountReceived() MOZ_OVERRIDE { return 0; }
// nsISupports methods
NS_DECL_THREADSAFE_ISUPPORTS
// Implementations of the async_event APIs
virtual int async_wait(int how, NR_async_cb cb, void *cb_arg,
char *function, int line);
virtual int cancel(int how);
char *function, int line) MOZ_OVERRIDE;
virtual int cancel(int how) MOZ_OVERRIDE;
// Implementations of the nr_socket APIs
virtual int create(nr_transport_addr *addr); // (really init, but it's called create)
virtual int create(nr_transport_addr *addr) MOZ_OVERRIDE; // (really init, but it's called create)
virtual int sendto(const void *msg, size_t len,
int flags, nr_transport_addr *to);
int flags, nr_transport_addr *to) MOZ_OVERRIDE;
virtual int recvfrom(void * buf, size_t maxlen,
size_t *len, int flags,
nr_transport_addr *from);
virtual int getaddr(nr_transport_addr *addrp);
virtual void close();
virtual int connect(nr_transport_addr *addr);
virtual int write(const void *msg, size_t len, size_t *written);
virtual int read(void* buf, size_t maxlen, size_t *len);
nr_transport_addr *from) MOZ_OVERRIDE;
virtual int getaddr(nr_transport_addr *addrp) MOZ_OVERRIDE;
virtual void close() MOZ_OVERRIDE;
virtual int connect(nr_transport_addr *addr) MOZ_OVERRIDE;
virtual int write(const void *msg, size_t len, size_t *written) MOZ_OVERRIDE;
virtual int read(void* buf, size_t maxlen, size_t *len) MOZ_OVERRIDE;
private:
virtual ~NrSocket() {
@ -206,17 +206,17 @@ public:
explicit NrSocketIpc(const nsCOMPtr<nsIEventTarget> &main_thread);
// Implementations of the NrSocketBase APIs
virtual int create(nr_transport_addr *addr);
virtual int create(nr_transport_addr *addr) MOZ_OVERRIDE;
virtual int sendto(const void *msg, size_t len,
int flags, nr_transport_addr *to);
int flags, nr_transport_addr *to) MOZ_OVERRIDE;
virtual int recvfrom(void * buf, size_t maxlen,
size_t *len, int flags,
nr_transport_addr *from);
virtual int getaddr(nr_transport_addr *addrp);
virtual void close();
virtual int connect(nr_transport_addr *addr);
virtual int write(const void *msg, size_t len, size_t *written);
virtual int read(void* buf, size_t maxlen, size_t *len);
nr_transport_addr *from) MOZ_OVERRIDE;
virtual int getaddr(nr_transport_addr *addrp) MOZ_OVERRIDE;
virtual void close() MOZ_OVERRIDE;
virtual int connect(nr_transport_addr *addr) MOZ_OVERRIDE;
virtual int write(const void *msg, size_t len, size_t *written) MOZ_OVERRIDE;
virtual int read(void* buf, size_t maxlen, size_t *len) MOZ_OVERRIDE;
private:
virtual ~NrSocketIpc() {};

View File

@ -98,7 +98,7 @@ class NrIceResolver
cb_(cb), cb_arg_(cb_arg),
canceled_ (false) {}
NS_IMETHOD OnLookupComplete(nsICancelable *request, nsIDNSRecord *record,
nsresult status);
nsresult status) MOZ_OVERRIDE;
int cancel();
nsCOMPtr<nsICancelable> request_;
NS_DECL_THREADSAFE_ISUPPORTS

View File

@ -110,7 +110,7 @@ class SocketHandler : public nsASocketHandler {
explicit SocketHandler(SocketTransportServiceTest *test) : test_(test) {
}
void OnSocketReady(PRFileDesc *fd, int16_t outflags) {
void OnSocketReady(PRFileDesc *fd, int16_t outflags) MOZ_OVERRIDE {
unsigned char buf[1600];
int32_t rv;
@ -121,15 +121,15 @@ class SocketHandler : public nsASocketHandler {
}
}
void OnSocketDetached(PRFileDesc *fd) {}
void OnSocketDetached(PRFileDesc *fd) MOZ_OVERRIDE {}
void IsLocal(bool *aIsLocal) {
void IsLocal(bool *aIsLocal) MOZ_OVERRIDE {
// TODO(jesup): better check? Does it matter? (likely no)
*aIsLocal = false;
}
virtual uint64_t ByteCountSent() { return 0; }
virtual uint64_t ByteCountReceived() { return 0; }
virtual uint64_t ByteCountSent() MOZ_OVERRIDE { return 0; }
virtual uint64_t ByteCountReceived() MOZ_OVERRIDE { return 0; }
NS_DECL_ISUPPORTS

View File

@ -63,26 +63,26 @@ class TransportLayerPrsock : public TransportLayer {
}
// Implement nsASocket
virtual void OnSocketReady(PRFileDesc *fd, int16_t outflags) {
virtual void OnSocketReady(PRFileDesc *fd, int16_t outflags) MOZ_OVERRIDE {
if (prsock_) {
prsock_->OnSocketReady(fd, outflags);
}
}
virtual void OnSocketDetached(PRFileDesc *fd) {
virtual void OnSocketDetached(PRFileDesc *fd) MOZ_OVERRIDE {
if (prsock_) {
prsock_->OnSocketDetached(fd);
}
PR_Close(fd_);
}
virtual void IsLocal(bool *aIsLocal) {
virtual void IsLocal(bool *aIsLocal) MOZ_OVERRIDE {
// TODO(jesup): better check? Does it matter? (likely no)
*aIsLocal = false;
}
virtual uint64_t ByteCountSent() { return 0; }
virtual uint64_t ByteCountReceived() { return 0; }
virtual uint64_t ByteCountSent() MOZ_OVERRIDE { return 0; }
virtual uint64_t ByteCountReceived() MOZ_OVERRIDE { return 0; }
// nsISupports methods
NS_DECL_THREADSAFE_ISUPPORTS

View File

@ -270,25 +270,25 @@ public:
}
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHODIMP OnCreateOfferSuccess(const char* offer, ER&);
NS_IMETHODIMP OnCreateOfferError(uint32_t code, const char *msg, ER&);
NS_IMETHODIMP OnCreateAnswerSuccess(const char* answer, ER&);
NS_IMETHODIMP OnCreateAnswerError(uint32_t code, const char *msg, ER&);
NS_IMETHODIMP OnSetLocalDescriptionSuccess(ER&);
NS_IMETHODIMP OnSetRemoteDescriptionSuccess(ER&);
NS_IMETHODIMP OnSetLocalDescriptionError(uint32_t code, const char *msg, ER&);
NS_IMETHODIMP OnSetRemoteDescriptionError(uint32_t code, const char *msg, ER&);
NS_IMETHODIMP NotifyDataChannel(nsIDOMDataChannel *channel, ER&);
NS_IMETHODIMP OnStateChange(PCObserverStateType state_type, ER&, void*);
NS_IMETHODIMP OnAddStream(DOMMediaStream *stream, ER&);
NS_IMETHODIMP OnRemoveStream(ER&);
NS_IMETHODIMP OnAddTrack(ER&);
NS_IMETHODIMP OnRemoveTrack(ER&);
NS_IMETHODIMP OnReplaceTrackSuccess(ER&);
NS_IMETHODIMP OnReplaceTrackError(uint32_t code, const char *msg, ER&);
NS_IMETHODIMP OnAddIceCandidateSuccess(ER&);
NS_IMETHODIMP OnAddIceCandidateError(uint32_t code, const char *msg, ER&);
NS_IMETHODIMP OnIceCandidate(uint16_t level, const char *mid, const char *cand, ER&);
NS_IMETHOD OnCreateOfferSuccess(const char* offer, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnCreateOfferError(uint32_t code, const char *msg, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnCreateAnswerSuccess(const char* answer, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnCreateAnswerError(uint32_t code, const char *msg, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnSetLocalDescriptionSuccess(ER&) MOZ_OVERRIDE;
NS_IMETHOD OnSetRemoteDescriptionSuccess(ER&) MOZ_OVERRIDE;
NS_IMETHOD OnSetLocalDescriptionError(uint32_t code, const char *msg, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnSetRemoteDescriptionError(uint32_t code, const char *msg, ER&) MOZ_OVERRIDE;
NS_IMETHOD NotifyDataChannel(nsIDOMDataChannel *channel, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnStateChange(PCObserverStateType state_type, ER&, void*) MOZ_OVERRIDE;
NS_IMETHOD OnAddStream(DOMMediaStream *stream, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnRemoveStream(ER&) MOZ_OVERRIDE;
NS_IMETHOD OnAddTrack(ER&) MOZ_OVERRIDE;
NS_IMETHOD OnRemoveTrack(ER&) MOZ_OVERRIDE;
NS_IMETHOD OnReplaceTrackSuccess(ER&) MOZ_OVERRIDE;
NS_IMETHOD OnReplaceTrackError(uint32_t code, const char *msg, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnAddIceCandidateSuccess(ER&) MOZ_OVERRIDE;
NS_IMETHOD OnAddIceCandidateError(uint32_t code, const char *msg, ER&) MOZ_OVERRIDE;
NS_IMETHOD OnIceCandidate(uint16_t level, const char *mid, const char *cand, ER&) MOZ_OVERRIDE;
// Hack because add_ice_candidates can happen asynchronously with respect
// to the API calls. The whole test suite needs a refactor.