Bug 1028143 - Privatizing public destructor of MediaPipeline. r=jesup
authorAnuj Agarwal <anujagarwal464@gmail.com>
Sat, 12 Jul 2014 10:34:00 +0200
changeset 203491 0d8aa5c075e984b1758573d922f2eef3e843b091
parent 203490 fcb56e7e49e31ba7c30b53f66688c744bdeb7623
child 203492 4a4e0c618649904bf572156453b83f7c59bf96c7
push id27428
push usercbook@mozilla.com
push dateThu, 04 Sep 2014 13:00:04 +0000
treeherdermozilla-central@7bfd030e8fc8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1028143
milestone35.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 1028143 - Privatizing public destructor of MediaPipeline. r=jesup
media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
@@ -63,24 +63,16 @@ class PeerIdentity;
 // One or another GIPS threads
 //   * Receives RTCP messages to send to the other side
 //   * Processes video frames GIPS wants to render
 //
 // For a transmitting conduit, "output" is RTP and "input" is RTCP.
 // For a receiving conduit, "input" is RTP and "output" is RTCP.
 //
 
-class MediaPipeline;
-
-template<>
-struct HasDangerousPublicDestructor<MediaPipeline>
-{
-  static const bool value = true;
-};
-
 class MediaPipeline : public sigslot::has_slots<> {
  public:
   enum Direction { TRANSMIT, RECEIVE };
   enum State { MP_CONNECTING, MP_OPEN, MP_CLOSED };
   MediaPipeline(const std::string& pc,
                 Direction direction,
                 nsCOMPtr<nsIEventTarget> main_thread,
                 nsCOMPtr<nsIEventTarget> sts_thread,
@@ -112,18 +104,16 @@ class MediaPipeline : public sigslot::ha
       // Therefore it's an error to send in the same flow for
       // both rtp and rtcp.
       MOZ_ASSERT(rtp_transport != rtcp_transport);
 
       // PipelineTransport() will access this->sts_thread_; moved here for safety
       transport_ = new PipelineTransport(this);
   }
 
-  virtual ~MediaPipeline();
-
   // Must be called on the STS thread.  Must be called after ShutdownMedia_m().
   void ShutdownTransport_s();
 
   // Must be called on the main thread.
   void ShutdownMedia_m() {
     ASSERT_ON_THREAD(main_thread_);
 
     if (stream_) {
@@ -167,16 +157,17 @@ class MediaPipeline : public sigslot::ha
   typedef enum {
     RTP,
     RTCP,
     MUX,
     MAX_RTP_TYPE
   } RtpType;
 
  protected:
+  virtual ~MediaPipeline();
   virtual void DetachMediaStream() {}
 
   // Separate class to allow ref counting
   class PipelineTransport : public TransportInterface {
    public:
     // Implement the TransportInterface functions
     explicit PipelineTransport(MediaPipeline *pipeline)
         : pipeline_(pipeline),