Bug 1118432 - Mark virtual overridden functions as MOZ_OVERRIDE in WebRTC; r=jesup
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 06 Jan 2015 15:17:07 -0500
changeset 248170 19b240eda68e423974d68326e79d4a50c3eaf758
parent 248169 0cd58b83cbc90cd913a19220938085b9e5cabcfb
child 248171 6ec4eb9786d8934bec54d38e7c419ee7d1f6240e
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1118432
milestone37.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 1118432 - Mark virtual overridden functions as MOZ_OVERRIDE in WebRTC; r=jesup
media/webrtc/signaling/src/jsep/JsepSessionImpl.h
media/webrtc/signaling/src/jsep/JsepTrackImpl.h
media/webrtc/signaling/src/media-conduit/AudioConduit.h
media/webrtc/signaling/src/media-conduit/VideoConduit.h
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.h
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.h
@@ -135,17 +135,17 @@ public:
                                         uint16_t defaultCandidatePort,
                                         uint16_t level) MOZ_OVERRIDE;
 
   virtual nsresult Close() MOZ_OVERRIDE;
 
   virtual const std::string GetLastError() const MOZ_OVERRIDE;
 
   virtual bool
-  IsIceControlling() const
+  IsIceControlling() const MOZ_OVERRIDE
   {
     return mIceControlling;
   }
 
   virtual bool
   IsOfferer() const
   {
     return mIsOfferer;
@@ -173,17 +173,17 @@ public:
   // Access the negotiated track pairs.
   virtual size_t
   GetNegotiatedTrackPairCount() const MOZ_OVERRIDE
   {
     return mNegotiatedTrackPairs.size();
   }
 
   virtual nsresult
-  GetNegotiatedTrackPair(size_t index, const JsepTrackPair** pair) const
+  GetNegotiatedTrackPair(size_t index, const JsepTrackPair** pair) const MOZ_OVERRIDE
   {
     if (index >= mNegotiatedTrackPairs.size())
       return NS_ERROR_INVALID_ARG;
 
     *pair = &mNegotiatedTrackPairs[index];
 
     return NS_OK;
   }
--- a/media/webrtc/signaling/src/jsep/JsepTrackImpl.h
+++ b/media/webrtc/signaling/src/jsep/JsepTrackImpl.h
@@ -58,17 +58,17 @@ public:
   {
     auto it = mExtmap.find(ext_name);
     if (it != mExtmap.end()) {
       return &it->second;
     }
     return nullptr;
   }
 
-  virtual std::vector<uint8_t> GetUniquePayloadTypes() const
+  virtual std::vector<uint8_t> GetUniquePayloadTypes() const MOZ_OVERRIDE
   {
     return mUniquePayloadTypes;
   }
 
   virtual void AddUniquePayloadType(uint8_t pt) MOZ_OVERRIDE
   {
     mUniquePayloadTypes.push_back(pt);
   }
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.h
@@ -51,55 +51,55 @@ class WebrtcAudioConduit:public AudioSes
 public:
   //VoiceEngine defined constant for Payload Name Size.
   static const unsigned int CODEC_PLNAME_SIZE;
 
   /**
    * APIs used by the registered external transport to this Conduit to
    * feed in received RTP Frames to the VoiceEngine for decoding
    */
-  virtual MediaConduitErrorCode ReceivedRTPPacket(const void *data, int len);
+  virtual MediaConduitErrorCode ReceivedRTPPacket(const void *data, int len) MOZ_OVERRIDE;
 
   /**
    * APIs used by the registered external transport to this Conduit to
    * feed in received RTCP Frames to the VoiceEngine for decoding
    */
-  virtual MediaConduitErrorCode ReceivedRTCPPacket(const void *data, int len);
+  virtual MediaConduitErrorCode ReceivedRTCPPacket(const void *data, int len) MOZ_OVERRIDE;
 
   /**
    * Function to configure send codec for the audio session
    * @param sendSessionConfig: CodecConfiguration
    * @result: On Success, the audio engine is configured with passed in codec for send
    *          On failure, audio engine transmit functionality is disabled.
    * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
    *        transmission sub-system on the engine.
    */
-  virtual MediaConduitErrorCode ConfigureSendMediaCodec(const AudioCodecConfig* codecConfig);
+  virtual MediaConduitErrorCode ConfigureSendMediaCodec(const AudioCodecConfig* codecConfig) MOZ_OVERRIDE;
   /**
    * Function to configure list of receive codecs for the audio session
    * @param sendSessionConfig: CodecConfiguration
    * @result: On Success, the audio engine is configured with passed in codec for send
    *          Also the playout is enabled.
    *          On failure, audio engine transmit functionality is disabled.
    * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
    *        transmission sub-system on the engine.
    */
   virtual MediaConduitErrorCode ConfigureRecvMediaCodecs(
-    const std::vector<AudioCodecConfig* >& codecConfigList);
+    const std::vector<AudioCodecConfig* >& codecConfigList) MOZ_OVERRIDE;
   /**
    * Function to enable the audio level extension
    * @param enabled: enable extension
    */
-  virtual MediaConduitErrorCode EnableAudioLevelExtension(bool enabled, uint8_t id);
+  virtual MediaConduitErrorCode EnableAudioLevelExtension(bool enabled, uint8_t id) MOZ_OVERRIDE;
 
   /**
    * Register External Transport to this Conduit. RTP and RTCP frames from the VoiceEngine
    * shall be passed to the registered transport for transporting externally.
    */
-  virtual MediaConduitErrorCode AttachTransport(mozilla::RefPtr<TransportInterface> aTransport);
+  virtual MediaConduitErrorCode AttachTransport(mozilla::RefPtr<TransportInterface> aTransport) MOZ_OVERRIDE;
   /**
    * Function to deliver externally captured audio sample for encoding and transport
    * @param audioData [in]: Pointer to array containing a frame of audio
    * @param lengthSamples [in]: Length of audio frame in samples in multiple of 10 milliseconds
    *                             Ex: Frame length is 160, 320, 440 for 16, 32, 44 kHz sampling rates
                                     respectively.
                                     audioData[] should be of lengthSamples in size
                                     say, for 16kz sampling rate, audioData[] should contain 160
@@ -109,17 +109,17 @@ public:
                                  in milliseconds.
    * NOTE: ConfigureSendMediaCodec() SHOULD be called before this function can be invoked
    *       This ensures the inserted audio-samples can be transmitted by the conduit
    *
    */
   virtual MediaConduitErrorCode SendAudioFrame(const int16_t speechData[],
                                                int32_t lengthSamples,
                                                int32_t samplingFreqHz,
-                                               int32_t capture_time);
+                                               int32_t capture_time) MOZ_OVERRIDE;
 
   /**
    * Function to grab a decoded audio-sample from the media engine for rendering
    * / playoutof length 10 milliseconds.
    *
    * @param speechData [in]: Pointer to a array to which a 10ms frame of audio will be copied
    * @param samplingFreqHz [in]: Frequency of the sampling for playback in Hertz (16000, 32000,..)
    * @param capture_delay [in]: Estimated Time between reading of the samples to rendering/playback
@@ -130,33 +130,33 @@ public:
    *          peformance
    * NOTE: ConfigureRecvMediaCodec() SHOULD be called before this function can be invoked
    *       This ensures the decoded samples are ready for reading and playout is enabled.
    *
    */
    virtual MediaConduitErrorCode GetAudioFrame(int16_t speechData[],
                                               int32_t samplingFreqHz,
                                               int32_t capture_delay,
-                                              int& lengthSamples);
+                                              int& lengthSamples) MOZ_OVERRIDE;
 
 
   /**
    * Webrtc transport implementation to send and receive RTP packet.
    * AudioConduit registers itself as ExternalTransport to the VoiceEngine
    */
-  virtual int SendPacket(int channel, const void *data, int len) ;
+  virtual int SendPacket(int channel, const void *data, int len) MOZ_OVERRIDE;
 
   /**
    * Webrtc transport implementation to send and receive RTCP packet.
    * AudioConduit registers itself as ExternalTransport to the VoiceEngine
    */
-  virtual int SendRTCPPacket(int channel, const void *data, int len) ;
+  virtual int SendRTCPPacket(int channel, const void *data, int len) MOZ_OVERRIDE;
 
 
-  virtual uint64_t CodecPluginID() { return 0; }
+  virtual uint64_t CodecPluginID() MOZ_OVERRIDE { return 0; }
 
   WebrtcAudioConduit():
                       mOtherDirection(nullptr),
                       mShutDown(false),
                       mVoiceEngine(nullptr),
                       mTransport(nullptr),
                       mEngineTransmitting(false),
                       mEngineReceiving(false),
@@ -173,48 +173,48 @@ public:
 
   virtual ~WebrtcAudioConduit();
 
   MediaConduitErrorCode Init(WebrtcAudioConduit *other);
 
   int GetChannel() { return mChannel; }
   webrtc::VoiceEngine* GetVoiceEngine() { return mVoiceEngine; }
   bool SetLocalSSRC(unsigned int ssrc) MOZ_OVERRIDE;
-  bool GetLocalSSRC(unsigned int* ssrc);
-  bool GetRemoteSSRC(unsigned int* ssrc);
+  bool GetLocalSSRC(unsigned int* ssrc) MOZ_OVERRIDE;
+  bool GetRemoteSSRC(unsigned int* ssrc) MOZ_OVERRIDE;
   bool SetLocalCNAME(const char* cname) MOZ_OVERRIDE;
   bool GetVideoEncoderStats(double* framerateMean,
                             double* framerateStdDev,
                             double* bitrateMean,
                             double* bitrateStdDev,
-                            uint32_t* droppedFrames)
+                            uint32_t* droppedFrames) MOZ_OVERRIDE
   {
     return false;
   }
   bool GetVideoDecoderStats(double* framerateMean,
                             double* framerateStdDev,
                             double* bitrateMean,
                             double* bitrateStdDev,
-                            uint32_t* discardedPackets)
+                            uint32_t* discardedPackets) MOZ_OVERRIDE
   {
     return false;
   }
   bool GetAVStats(int32_t* jitterBufferDelayMs,
                   int32_t* playoutBufferDelayMs,
-                  int32_t* avSyncOffsetMs);
-  bool GetRTPStats(unsigned int* jitterMs, unsigned int* cumulativeLost);
+                  int32_t* avSyncOffsetMs) MOZ_OVERRIDE;
+  bool GetRTPStats(unsigned int* jitterMs, unsigned int* cumulativeLost) MOZ_OVERRIDE;
   bool GetRTCPReceiverReport(DOMHighResTimeStamp* timestamp,
                              uint32_t* jitterMs,
                              uint32_t* packetsReceived,
                              uint64_t* bytesReceived,
                              uint32_t *cumulativeLost,
-                             int32_t* rttMs);
+                             int32_t* rttMs) MOZ_OVERRIDE;
   bool GetRTCPSenderReport(DOMHighResTimeStamp* timestamp,
                            unsigned int* packetsSent,
-                           uint64_t* bytesSent);
+                           uint64_t* bytesSent) MOZ_OVERRIDE;
 
 private:
   WebrtcAudioConduit(const WebrtcAudioConduit& other) MOZ_DELETE;
   void operator=(const WebrtcAudioConduit& other) MOZ_DELETE;
 
   //Local database of currently applied receive codecs
   typedef std::vector<AudioCodecConfig* > RecvCodecList;
 
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.h
@@ -74,66 +74,66 @@ public:
   void SyncTo(WebrtcAudioConduit *aConduit);
 
   /**
    * Function to attach Renderer end-point for the Media-Video conduit.
    * @param aRenderer : Reference to the concrete Video renderer implementation
    * Note: Multiple invocations of this API shall remove an existing renderer
    * and attaches the new to the Conduit.
    */
-  virtual MediaConduitErrorCode AttachRenderer(mozilla::RefPtr<VideoRenderer> aVideoRenderer);
-  virtual void DetachRenderer();
+  virtual MediaConduitErrorCode AttachRenderer(mozilla::RefPtr<VideoRenderer> aVideoRenderer) MOZ_OVERRIDE;
+  virtual void DetachRenderer() MOZ_OVERRIDE;
 
   /**
    * APIs used by the registered external transport to this Conduit to
    * feed in received RTP Frames to the VideoEngine for decoding
    */
-  virtual MediaConduitErrorCode ReceivedRTPPacket(const void *data, int len);
+  virtual MediaConduitErrorCode ReceivedRTPPacket(const void *data, int len) MOZ_OVERRIDE;
 
   /**
    * APIs used by the registered external transport to this Conduit to
    * feed in received RTP Frames to the VideoEngine for decoding
    */
-  virtual MediaConduitErrorCode ReceivedRTCPPacket(const void *data, int len);
+  virtual MediaConduitErrorCode ReceivedRTCPPacket(const void *data, int len) MOZ_OVERRIDE;
 
    /**
    * Function to configure send codec for the video session
    * @param sendSessionConfig: CodecConfiguration
    * @result: On Success, the video engine is configured with passed in codec for send
    *          On failure, video engine transmit functionality is disabled.
    * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
    *        transmission sub-system on the engine.
    */
-  virtual MediaConduitErrorCode ConfigureSendMediaCodec(const VideoCodecConfig* codecInfo);
+  virtual MediaConduitErrorCode ConfigureSendMediaCodec(const VideoCodecConfig* codecInfo) MOZ_OVERRIDE;
 
   /**
    * Function to configure list of receive codecs for the video session
    * @param sendSessionConfig: CodecConfiguration
    * @result: On Success, the video engine is configured with passed in codec for send
    *          Also the playout is enabled.
    *          On failure, video engine transmit functionality is disabled.
    * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
    *        transmission sub-system on the engine.
    */
    virtual MediaConduitErrorCode ConfigureRecvMediaCodecs(
-                               const std::vector<VideoCodecConfig* >& codecConfigList);
+                               const std::vector<VideoCodecConfig* >& codecConfigList) MOZ_OVERRIDE;
 
   /**
    * Register Transport for this Conduit. RTP and RTCP frames from the VideoEngine
    * shall be passed to the registered transport for transporting externally.
    */
-  virtual MediaConduitErrorCode AttachTransport(mozilla::RefPtr<TransportInterface> aTransport);
+  virtual MediaConduitErrorCode AttachTransport(mozilla::RefPtr<TransportInterface> aTransport) MOZ_OVERRIDE;
 
   /**
    * Function to select and change the encoding resolution based on incoming frame size
    * and current available bandwidth.
    * @param width, height: dimensions of the frame
    */
-  virtual bool SelectSendResolution(unsigned short width,
-                                    unsigned short height);
+  bool SelectSendResolution(unsigned short width,
+                            unsigned short height);
 
   /**
    * Function to deliver a capture video frame for encoding and transport
    * @param video_frame: pointer to captured video-frame.
    * @param video_frame_length: size of the frame
    * @param width, height: dimensions of the frame
    * @param video_type: Type of the video frame - I420, RAW
    * @param captured_time: timestamp when the frame was captured.
@@ -141,127 +141,127 @@ public:
    *NOTE: ConfigureSendMediaCodec() SHOULD be called before this function can be invoked
    *       This ensures the inserted video-frames can be transmitted by the conduit
    */
   virtual MediaConduitErrorCode SendVideoFrame(unsigned char* video_frame,
                                                 unsigned int video_frame_length,
                                                 unsigned short width,
                                                 unsigned short height,
                                                 VideoType video_type,
-                                                uint64_t capture_time);
+                                                uint64_t capture_time) MOZ_OVERRIDE;
 
   /**
    * Set an external encoder object |encoder| to the payload type |pltype|
    * for sender side codec.
    */
   virtual MediaConduitErrorCode SetExternalSendCodec(VideoCodecConfig* config,
-                                                     VideoEncoder* encoder);
+                                                     VideoEncoder* encoder) MOZ_OVERRIDE;
 
   /**
    * Set an external decoder object |decoder| to the payload type |pltype|
    * for receiver side codec.
    */
   virtual MediaConduitErrorCode SetExternalRecvCodec(VideoCodecConfig* config,
-                                                     VideoDecoder* decoder);
+                                                     VideoDecoder* decoder) MOZ_OVERRIDE;
 
 
   /**
    * Webrtc transport implementation to send and receive RTP packet.
    * VideoConduit registers itself as ExternalTransport to the VideoEngine
    */
-  virtual int SendPacket(int channel, const void *data, int len) ;
+  virtual int SendPacket(int channel, const void *data, int len) MOZ_OVERRIDE;
 
   /**
    * Webrtc transport implementation to send and receive RTCP packet.
    * VideoConduit registers itself as ExternalTransport to the VideoEngine
    */
-  virtual int SendRTCPPacket(int channel, const void *data, int len) ;
+  virtual int SendRTCPPacket(int channel, const void *data, int len) MOZ_OVERRIDE;
 
 
   /**
    * Webrtc External Renderer Implementation APIs.
    * Raw I420 Frames are delivred to the VideoConduit by the VideoEngine
    */
-  virtual int FrameSizeChange(unsigned int, unsigned int, unsigned int);
+  virtual int FrameSizeChange(unsigned int, unsigned int, unsigned int) MOZ_OVERRIDE;
 
   virtual int DeliverFrame(unsigned char*,int, uint32_t , int64_t,
-                           void *handle);
+                           void *handle) MOZ_OVERRIDE;
 
   /**
    * Does DeliverFrame() support a null buffer and non-null handle
    * (video texture)?
    * B2G support it (when using HW video decoder with graphic buffer output).
    * XXX Investigate!  Especially for Android
    */
-  virtual bool IsTextureSupported() {
+  virtual bool IsTextureSupported() MOZ_OVERRIDE {
 #ifdef WEBRTC_GONK
     return true;
 #else
     return false;
 #endif
   }
 
-  virtual uint64_t CodecPluginID();
+  virtual uint64_t CodecPluginID() MOZ_OVERRIDE;
 
-  unsigned short SendingWidth() {
+  unsigned short SendingWidth() MOZ_OVERRIDE {
     return mSendingWidth;
   }
 
-  unsigned short SendingHeight() {
+  unsigned short SendingHeight() MOZ_OVERRIDE {
     return mSendingHeight;
   }
 
-  unsigned int SendingMaxFs() {
+  unsigned int SendingMaxFs() MOZ_OVERRIDE {
     if(mCurSendCodecConfig) {
       return mCurSendCodecConfig->mMaxFrameSize;
     }
     return 0;
   }
 
-  unsigned int SendingMaxFr() {
+  unsigned int SendingMaxFr() MOZ_OVERRIDE {
     if(mCurSendCodecConfig) {
       return mCurSendCodecConfig->mMaxFrameRate;
     }
     return 0;
   }
 
   WebrtcVideoConduit();
   virtual ~WebrtcVideoConduit();
 
   MediaConduitErrorCode Init(WebrtcVideoConduit *other);
 
   int GetChannel() { return mChannel; }
   webrtc::VideoEngine* GetVideoEngine() { return mVideoEngine; }
   bool GetLocalSSRC(unsigned int* ssrc) MOZ_OVERRIDE;
-  bool SetLocalSSRC(unsigned int ssrc);
-  bool GetRemoteSSRC(unsigned int* ssrc);
+  bool SetLocalSSRC(unsigned int ssrc) MOZ_OVERRIDE;
+  bool GetRemoteSSRC(unsigned int* ssrc) MOZ_OVERRIDE;
   bool SetLocalCNAME(const char* cname) MOZ_OVERRIDE;
   bool GetVideoEncoderStats(double* framerateMean,
                             double* framerateStdDev,
                             double* bitrateMean,
                             double* bitrateStdDev,
-                            uint32_t* droppedFrames);
+                            uint32_t* droppedFrames) MOZ_OVERRIDE;
   bool GetVideoDecoderStats(double* framerateMean,
                             double* framerateStdDev,
                             double* bitrateMean,
                             double* bitrateStdDev,
-                            uint32_t* discardedPackets);
+                            uint32_t* discardedPackets) MOZ_OVERRIDE;
   bool GetAVStats(int32_t* jitterBufferDelayMs,
                   int32_t* playoutBufferDelayMs,
-                  int32_t* avSyncOffsetMs);
-  bool GetRTPStats(unsigned int* jitterMs, unsigned int* cumulativeLost);
+                  int32_t* avSyncOffsetMs) MOZ_OVERRIDE;
+  bool GetRTPStats(unsigned int* jitterMs, unsigned int* cumulativeLost) MOZ_OVERRIDE;
   bool GetRTCPReceiverReport(DOMHighResTimeStamp* timestamp,
                              uint32_t* jitterMs,
                              uint32_t* packetsReceived,
                              uint64_t* bytesReceived,
                              uint32_t* cumulativeLost,
-                             int32_t* rttMs);
+                             int32_t* rttMs) MOZ_OVERRIDE;
   bool GetRTCPSenderReport(DOMHighResTimeStamp* timestamp,
                            unsigned int* packetsSent,
-                           uint64_t* bytesSent);
+                           uint64_t* bytesSent) MOZ_OVERRIDE;
   uint64_t MozVideoLatencyAvg();
 
 private:
 
   WebrtcVideoConduit(const WebrtcVideoConduit& other) MOZ_DELETE;
   void operator=(const WebrtcVideoConduit& other) MOZ_DELETE;
 
   //Local database of currently applied receive codecs
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
@@ -107,28 +107,28 @@ public:
   virtual ~WebrtcGmpVideoDecoder();
 
   // Implement VideoDecoder interface.
   virtual const uint64_t PluginID() MOZ_OVERRIDE
   {
     return mGMP ? mGMP->ParentID() : mCachedPluginId;
   }
 
-  virtual void Terminated();
+  virtual void Terminated() MOZ_OVERRIDE;
 
   virtual int32_t InitDecode(const webrtc::VideoCodec* aCodecSettings,
-                             int32_t aNumberOfCores);
+                             int32_t aNumberOfCores) MOZ_OVERRIDE;
   virtual int32_t Decode(const webrtc::EncodedImage& aInputImage,
                          bool aMissingFrames,
                          const webrtc::RTPFragmentationHeader* aFragmentation,
                          const webrtc::CodecSpecificInfo* aCodecSpecificInfo = nullptr,
                          int64_t aRenderTimeMs = -1) MOZ_OVERRIDE;
   virtual int32_t RegisterDecodeCompleteCallback(webrtc::DecodedImageCallback* aCallback) MOZ_OVERRIDE;
 
-  virtual int32_t Release();
+  virtual int32_t Release() MOZ_OVERRIDE;
 
   virtual int32_t Reset() MOZ_OVERRIDE;
 
   virtual void Decoded(GMPVideoi420Frame* aDecodedFrame) MOZ_OVERRIDE;
 
   virtual void ReceivedDecodedReferenceFrame(const uint64_t aPictureId) MOZ_OVERRIDE {
     MOZ_CRASH();
   }
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
@@ -381,27 +381,27 @@ public:
 #ifdef MOZILLA_INTERNAL_API
   // when the principal of the PeerConnection changes, it calls through to here
   // so that we can determine whether to enable stream transmission
   virtual void UpdateSinkIdentity_m(nsIPrincipal* principal,
                                     const PeerIdentity* sinkIdentity);
 #endif
 
   // Called on the main thread.
-  virtual void DetachMediaStream() {
+  virtual void DetachMediaStream() MOZ_OVERRIDE {
     ASSERT_ON_THREAD(main_thread_);
     domstream_->RemoveDirectListener(listener_);
     domstream_ = nullptr;
     stream_->RemoveListener(listener_);
     // Let the listener be destroyed with the pipeline (or later).
     stream_ = nullptr;
   }
 
   // Override MediaPipeline::TransportReady.
-  virtual nsresult TransportReady_s(TransportInfo &info);
+  virtual nsresult TransportReady_s(TransportInfo &info) MOZ_OVERRIDE;
 
   // Replace a track with a different one
   // In non-compliance with the likely final spec, allow the new
   // track to be part of a different stream (since we don't support
   // multiple tracks of a type in a stream yet).  bug 1056650
   virtual nsresult ReplaceTrack(DOMMediaStream *domstream,
                                 TrackID track_id);
 
@@ -555,17 +555,17 @@ class MediaPipelineReceiveAudio : public
                             nsAutoPtr<MediaPipelineFilter> filter) :
       MediaPipelineReceive(pc, main_thread, sts_thread,
                            stream, track_id, level, conduit, rtp_transport,
                            rtcp_transport, filter),
       listener_(new PipelineListener(stream->AsSourceStream(),
                                      track_id, conduit)) {
   }
 
-  virtual void DetachMediaStream() {
+  virtual void DetachMediaStream() MOZ_OVERRIDE {
     ASSERT_ON_THREAD(main_thread_);
     listener_->EndTrack();
     stream_->RemoveListener(listener_);
     stream_ = nullptr;
   }
 
   virtual nsresult Init() MOZ_OVERRIDE;
 
@@ -619,17 +619,17 @@ class MediaPipelineReceiveVideo : public
       MediaPipelineReceive(pc, main_thread, sts_thread,
                            stream, track_id, level, conduit, rtp_transport,
                            rtcp_transport, filter),
       renderer_(new PipelineRenderer(MOZ_THIS_IN_INITIALIZER_LIST())),
       listener_(new PipelineListener(stream->AsSourceStream(), track_id)) {
   }
 
   // Called on the main thread.
-  virtual void DetachMediaStream() {
+  virtual void DetachMediaStream() MOZ_OVERRIDE {
     ASSERT_ON_THREAD(main_thread_);
 
     listener_->EndTrack();
     // stop generating video and thus stop invoking the PipelineRenderer
     // and PipelineListener - the renderer has a raw ptr to the Pipeline to
     // avoid cycles, and the render callbacks are invoked from a different
     // thread so simple null-checks would cause TSAN bugs without locks.
     static_cast<VideoSessionConduit*>(conduit_.get())->DetachRenderer();
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
@@ -55,17 +55,17 @@ public:
                                         NS_XPCOM_SHUTDOWN_OBSERVER_ID,
                                         false);
       MOZ_ALWAYS_TRUE(NS_SUCCEEDED(rv));
 #endif
       (void) rv;
     }
 
   NS_IMETHODIMP Observe(nsISupports* aSubject, const char* aTopic,
-                        const char16_t* aData) {
+                        const char16_t* aData) MOZ_OVERRIDE {
     if (strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0) {
       CSFLogDebug(logTag, "Shutting down PeerConnectionCtx");
       PeerConnectionCtx::Destroy();
 
       nsCOMPtr<nsIObserverService> observerService =
         services::GetObserverService();
       if (!observerService)
         return NS_ERROR_FAILURE;
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
@@ -260,17 +260,23 @@ public:
   static nsresult ConvertRTCConfiguration(const RTCConfiguration& aSrc,
                                           IceConfiguration *aDst);
   already_AddRefed<DOMMediaStream> MakeMediaStream(uint32_t aHint);
 
   nsresult CreateRemoteSourceStreamInfo(nsRefPtr<RemoteSourceStreamInfo>* aInfo,
                                         const std::string& aId);
 
   // DataConnection observers
-  void NotifyDataChannel(already_AddRefed<mozilla::DataChannel> aChannel);
+  void NotifyDataChannel(already_AddRefed<mozilla::DataChannel> aChannel)
+#ifdef MOZILLA_INTERNAL_API
+    // PeerConnectionImpl only inherits from mozilla::DataChannelConnection
+    // inside libxul.
+    MOZ_OVERRIDE
+#endif
+    ;
 
   // Get the media object
   const nsRefPtr<PeerConnectionMedia>& media() const {
     PC_AUTO_ENTER_API_CALL_NO_CHECK();
     return mMedia;
   }
 
   // Configure the ability to use localhost.