Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/media. r=padenot
authorSimon Giesecke <sgiesecke@mozilla.com>
Wed, 04 Mar 2020 15:39:20 +0000
changeset 516858 e8bdb82bfc2036919e0c6f57dd50dcde07f4d661
parent 516857 d64dfccd44ed694c4f323ac7c27afbe327f497ca
child 516859 0194aff14e504c2d787f9084acdc162afc1a9688
push id37183
push usernerli@mozilla.com
push dateThu, 05 Mar 2020 04:16:49 +0000
treeherdermozilla-central@1e4b37c9e558 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1613985
milestone75.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 1613985 - Use default for equivalent-to-default constructors/destructors in dom/media. r=padenot Differential Revision: https://phabricator.services.mozilla.com/D65178
dom/media/AudioConverter.h
dom/media/AudioSegment.h
dom/media/AudioStream.h
dom/media/BaseMediaResource.h
dom/media/BitReader.cpp
dom/media/BitWriter.cpp
dom/media/BufferMediaResource.h
dom/media/BufferReader.h
dom/media/ByteWriter.h
dom/media/CanvasCaptureMediaStream.cpp
dom/media/ChannelMediaResource.h
dom/media/CloneableWithRangeMediaResource.h
dom/media/DOMMediaStream.cpp
dom/media/DOMMediaStream.h
dom/media/FileBlockCache.h
dom/media/FileMediaResource.h
dom/media/FrameStatistics.h
dom/media/GraphDriver.cpp
dom/media/Intervals.h
dom/media/MediaBlockCacheBase.h
dom/media/MediaCache.cpp
dom/media/MediaData.cpp
dom/media/MediaData.h
dom/media/MediaDataDemuxer.h
dom/media/MediaDecoder.cpp
dom/media/MediaDecoderStateMachine.cpp
dom/media/MediaDeviceInfo.h
dom/media/MediaEventSource.h
dom/media/MediaFormatReader.cpp
dom/media/MediaFormatReader.h
dom/media/MediaInfo.h
dom/media/MediaMIMETypes.h
dom/media/MediaManager.h
dom/media/MediaResource.h
dom/media/MediaResourceCallback.h
dom/media/MediaStreamError.h
dom/media/MediaStreamTrack.h
dom/media/MediaTrack.cpp
dom/media/MediaTrackGraph.cpp
dom/media/MediaTrackList.cpp
dom/media/MediaTrackListener.h
dom/media/QueueObject.cpp
dom/media/ReaderProxy.cpp
dom/media/SharedBuffer.h
dom/media/TextTrack.cpp
dom/media/TextTrackCue.cpp
dom/media/TextTrackCueList.cpp
dom/media/TextTrackList.cpp
dom/media/TextTrackRegion.h
dom/media/TimeUnits.h
dom/media/VideoFrameContainer.cpp
dom/media/VideoPlaybackQuality.h
dom/media/VideoSegment.cpp
dom/media/VideoUtils.h
dom/media/doctor/DDLifetimes.h
dom/media/eme/CDMCaps.cpp
dom/media/eme/MediaKeyError.cpp
dom/media/eme/MediaKeyStatusMap.cpp
dom/media/eme/MediaKeySystemAccess.cpp
dom/media/encoder/EncodedFrame.h
dom/media/encoder/MediaEncoder.h
dom/media/encoder/TrackEncoder.h
dom/media/encoder/TrackMetadataBase.h
dom/media/fake-cdm/cdm-test-decryptor.h
dom/media/fake-cdm/cdm-test-storage.h
dom/media/flac/FlacDemuxer.cpp
dom/media/flac/FlacFrameParser.cpp
dom/media/gmp/ChromiumCDMAdapter.h
dom/media/gmp/ChromiumCDMCallback.h
dom/media/gmp/ChromiumCDMParent.h
dom/media/gmp/DecryptJob.h
dom/media/gmp/GMPCallbackBase.h
dom/media/gmp/GMPLoader.cpp
dom/media/gmp/GMPLoader.h
dom/media/gmp/GMPParent.h
dom/media/gmp/GMPPlatform.cpp
dom/media/gmp/GMPProcessChild.cpp
dom/media/gmp/GMPService.cpp
dom/media/gmp/GMPServiceChild.cpp
dom/media/gmp/GMPServiceParent.cpp
dom/media/gmp/GMPServiceParent.h
dom/media/gmp/GMPSharedMemManager.h
dom/media/gmp/GMPStorage.h
dom/media/gmp/GMPStorageChild.h
dom/media/gmp/GMPStorageParent.h
dom/media/gmp/GMPTimerParent.h
dom/media/gmp/GMPVideoDecoderParent.cpp
dom/media/gmp/GMPVideoDecoderProxy.h
dom/media/gmp/GMPVideoEncoderParent.h
dom/media/gmp/GMPVideoEncoderProxy.h
dom/media/gmp/GMPVideoHost.cpp
dom/media/gmp/GMPVideoi420FrameImpl.cpp
dom/media/gmp/gmp-api/gmp-platform.h
dom/media/gmp/gmp-api/gmp-storage.h
dom/media/gmp/widevine-adapter/content_decryption_module.h
dom/media/gmp/widevine-adapter/content_decryption_module_proxy.h
dom/media/gtest/TestCDMStorage.cpp
dom/media/gtest/TestGMPCrossOrigin.cpp
dom/media/gtest/TestMP3Demuxer.cpp
dom/media/gtest/TestMP4Demuxer.cpp
dom/media/gtest/TestMediaEventSource.cpp
dom/media/gtest/mp4_demuxer/TestParser.cpp
dom/media/imagecapture/CaptureTask.h
dom/media/ipc/RDDProcessImpl.cpp
dom/media/ipc/RDDProcessManager.h
dom/media/ipc/RemoteDecoderManagerParent.cpp
dom/media/mediasink/AudioSink.cpp
dom/media/mediasink/AudioSinkWrapper.cpp
dom/media/mediasink/AudioSinkWrapper.h
dom/media/mediasource/SourceBufferList.cpp
dom/media/mediasource/SourceBufferTask.h
dom/media/mediasource/TrackBuffersManager.h
dom/media/mp3/MP3Demuxer.h
dom/media/mp3/MP3FrameParser.cpp
dom/media/mp4/BufferStream.cpp
dom/media/mp4/ByteStream.h
dom/media/mp4/DecoderData.cpp
dom/media/mp4/DecoderData.h
dom/media/mp4/Index.cpp
dom/media/mp4/MP4Metadata.cpp
dom/media/mp4/MP4Metadata.h
dom/media/mp4/MoofParser.h
dom/media/ogg/OggDemuxer.cpp
dom/media/platforms/PDMFactory.cpp
dom/media/platforms/PEMFactory.h
dom/media/platforms/PlatformDecoderModule.h
dom/media/platforms/PlatformEncoderModule.h
dom/media/platforms/agnostic/AOMDecoder.cpp
dom/media/platforms/agnostic/DummyMediaDataDecoder.cpp
dom/media/platforms/agnostic/NullDecoderModule.cpp
dom/media/platforms/agnostic/bytestreams/H264.cpp
dom/media/platforms/agnostic/eme/ChromiumCDMVideoDecoder.cpp
dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
dom/media/platforms/ffmpeg/FFmpegDecoderModule.h
dom/media/platforms/omx/OmxDataDecoder.cpp
dom/media/platforms/omx/OmxPlatformLayer.cpp
dom/media/platforms/omx/OmxPlatformLayer.h
dom/media/platforms/omx/OmxPromiseLayer.h
dom/media/platforms/wrappers/MediaChangeMonitor.cpp
dom/media/systemservices/CamerasParent.h
dom/media/systemservices/MediaParent.cpp
dom/media/systemservices/MediaParent.h
dom/media/systemservices/MediaSystemResourceManagerChild.cpp
dom/media/systemservices/MediaSystemResourceService.cpp
dom/media/systemservices/MediaUtils.h
dom/media/systemservices/VideoEngine.h
dom/media/wave/WaveDemuxer.cpp
dom/media/wave/WaveDemuxer.h
dom/media/webaudio/AlignedTArray.h
dom/media/webaudio/AudioBuffer.cpp
dom/media/webaudio/AudioContext.cpp
dom/media/webaudio/AudioDestinationNode.cpp
dom/media/webaudio/AudioProcessingEvent.cpp
dom/media/webaudio/ConstantSourceNode.cpp
dom/media/webaudio/ScriptProcessorNode.cpp
dom/media/webaudio/blink/Biquad.cpp
dom/media/webaudio/blink/IIRFilter.cpp
dom/media/webaudio/blink/PeriodicWave.h
dom/media/webm/WebMDemuxer.h
dom/media/webrtc/RTCCertificate.h
dom/media/webspeech/synth/SpeechSynthesis.cpp
dom/media/webspeech/synth/SpeechSynthesisUtterance.cpp
dom/media/webspeech/synth/SpeechSynthesisVoice.cpp
dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
dom/xhr/XMLHttpRequestString.cpp
dom/xhr/XMLHttpRequestString.h
--- a/dom/media/AudioConverter.h
+++ b/dom/media/AudioConverter.h
@@ -43,17 +43,17 @@ struct AudioDataBufferTypeChooser<AudioC
 
 // 'Value' is the type used externally to deal with stored value.
 // AudioDataBuffer can perform conversion between different SampleFormat
 // content.
 template <AudioConfig::SampleFormat Format,
           typename Value = typename AudioDataBufferTypeChooser<Format>::Type>
 class AudioDataBuffer {
  public:
-  AudioDataBuffer() {}
+  AudioDataBuffer() = default;
   AudioDataBuffer(Value* aBuffer, size_t aLength) : mBuffer(aBuffer, aLength) {}
   explicit AudioDataBuffer(const AudioDataBuffer& aOther)
       : mBuffer(aOther.mBuffer) {}
   AudioDataBuffer(AudioDataBuffer&& aOther)
       : mBuffer(std::move(aOther.mBuffer)) {}
   template <AudioConfig::SampleFormat OtherFormat, typename OtherValue>
   explicit AudioDataBuffer(
       const AudioDataBuffer<OtherFormat, OtherValue>& other) {
--- a/dom/media/AudioSegment.h
+++ b/dom/media/AudioSegment.h
@@ -283,23 +283,22 @@ struct AudioChunk {
  * The audio rate is determined by the track, not stored in this class.
  */
 class AudioSegment : public MediaSegmentBase<AudioSegment, AudioChunk> {
  public:
   typedef mozilla::AudioSampleFormat SampleFormat;
 
   AudioSegment() : MediaSegmentBase<AudioSegment, AudioChunk>(AUDIO) {}
 
-  AudioSegment(AudioSegment&& aSegment)
-      : MediaSegmentBase<AudioSegment, AudioChunk>(std::move(aSegment)) {}
+  AudioSegment(AudioSegment&& aSegment) = default;
 
   AudioSegment(const AudioSegment&) = delete;
   AudioSegment& operator=(const AudioSegment&) = delete;
 
-  ~AudioSegment() {}
+  ~AudioSegment() = default;
 
   // Resample the whole segment in place.  `aResampler` is an instance of a
   // resampler, initialized with `aResamplerChannelCount` channels. If this
   // function finds a chunk with more channels, `aResampler` is destroyed and a
   // new resampler is created, and `aResamplerChannelCount` is updated with the
   // new channel count value.
   template <typename T>
   void Resample(nsAutoRef<SpeexResamplerState>& aResampler,
--- a/dom/media/AudioStream.h
+++ b/dom/media/AudioStream.h
@@ -186,17 +186,17 @@ class AudioStream final
     // Return the number of frames in this chunk.
     virtual uint32_t Frames() const = 0;
     // Return the number of audio channels.
     virtual uint32_t Channels() const = 0;
     // Return the sample rate of this chunk.
     virtual uint32_t Rate() const = 0;
     // Return a writable pointer for downmixing.
     virtual AudioDataValue* GetWritable() const = 0;
-    virtual ~Chunk() {}
+    virtual ~Chunk() = default;
   };
 
   class DataSource {
    public:
     // Return a chunk which contains at most aFrames frames or zero if no
     // frames in the source at all.
     virtual UniquePtr<Chunk> PopFrames(uint32_t aFrames) = 0;
     // Return true if no more data will be added to the source.
--- a/dom/media/BaseMediaResource.h
+++ b/dom/media/BaseMediaResource.h
@@ -117,17 +117,17 @@ class BaseMediaResource : public MediaRe
 
  protected:
   BaseMediaResource(MediaResourceCallback* aCallback, nsIChannel* aChannel,
                     nsIURI* aURI)
       : mCallback(aCallback),
         mChannel(aChannel),
         mURI(aURI),
         mLoadInBackground(false) {}
-  virtual ~BaseMediaResource() {}
+  virtual ~BaseMediaResource() = default;
 
   // Set the request's load flags to aFlags.  If the request is part of a
   // load group, the request is removed from the group, the flags are set, and
   // then the request is added back to the load group.
   void ModifyLoadFlags(nsLoadFlags aFlags);
 
   RefPtr<MediaResourceCallback> mCallback;
 
--- a/dom/media/BitReader.cpp
+++ b/dom/media/BitReader.cpp
@@ -17,17 +17,17 @@ BitReader::BitReader(const mozilla::Medi
 BitReader::BitReader(const uint8_t* aBuffer, size_t aBits)
     : mData(aBuffer),
       mOriginalBitSize(aBits),
       mTotalBitsLeft(aBits),
       mSize((aBits + 7) / 8),
       mReservoir(0),
       mNumBitsLeft(0) {}
 
-BitReader::~BitReader() {}
+BitReader::~BitReader() = default;
 
 uint32_t BitReader::ReadBits(size_t aNum) {
   MOZ_ASSERT(aNum <= 32);
   if (mTotalBitsLeft < aNum) {
     NS_ASSERTION(false, "Reading past end of buffer");
     return 0;
   }
   uint32_t result = 0;
--- a/dom/media/BitWriter.cpp
+++ b/dom/media/BitWriter.cpp
@@ -22,17 +22,17 @@ constexpr uint8_t golombLen[256] = {
     15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
     15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
     15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
     15, 15, 15, 15, 15, 15, 15, 15, 17,
 };
 
 BitWriter::BitWriter(MediaByteBuffer* aBuffer) : mBuffer(aBuffer) {}
 
-BitWriter::~BitWriter() {}
+BitWriter::~BitWriter() = default;
 
 void BitWriter::WriteBits(uint64_t aValue, size_t aBits) {
   MOZ_ASSERT(aBits <= sizeof(uint64_t) * 8);
 
   while (aBits) {
     if (mBitIndex == 0) {
       mBuffer->AppendElement(0);
     }
--- a/dom/media/BufferMediaResource.h
+++ b/dom/media/BufferMediaResource.h
@@ -21,17 +21,17 @@ DDLoggedTypeDeclNameAndBase(BufferMediaR
 class BufferMediaResource
     : public MediaResource,
       public DecoderDoctorLifeLogger<BufferMediaResource> {
  public:
   BufferMediaResource(const uint8_t* aBuffer, uint32_t aLength)
       : mBuffer(aBuffer), mLength(aLength) {}
 
  protected:
-  virtual ~BufferMediaResource() {}
+  virtual ~BufferMediaResource() = default;
 
  private:
   // These methods are called off the main thread.
   nsresult ReadAt(int64_t aOffset, char* aBuffer, uint32_t aCount,
                   uint32_t* aBytes) override {
     if (aOffset < 0 || aOffset > mLength) {
       return NS_ERROR_FAILURE;
     }
--- a/dom/media/BufferReader.h
+++ b/dom/media/BufferReader.h
@@ -42,17 +42,17 @@ class MOZ_RAII BufferReader {
 
   void SetData(const nsTArray<uint8_t>& aData) {
     MOZ_ASSERT(!mPtr && !mRemaining);
     mPtr = aData.Elements();
     mRemaining = aData.Length();
     mLength = mRemaining;
   }
 
-  ~BufferReader() {}
+  ~BufferReader() = default;
 
   size_t Offset() const { return mLength - mRemaining; }
 
   size_t Remaining() const { return mRemaining; }
 
   mozilla::Result<uint8_t, nsresult> ReadU8() {
     auto ptr = Read(1);
     if (!ptr) {
--- a/dom/media/ByteWriter.h
+++ b/dom/media/ByteWriter.h
@@ -9,17 +9,17 @@
 #include "nsTArray.h"
 
 namespace mozilla {
 
 template <typename Endianess>
 class ByteWriter {
  public:
   explicit ByteWriter(nsTArray<uint8_t>& aData) : mPtr(aData) {}
-  ~ByteWriter() {}
+  ~ByteWriter() = default;
 
   MOZ_MUST_USE bool WriteU8(uint8_t aByte) { return Write(&aByte, 1); }
 
   MOZ_MUST_USE bool WriteU16(uint16_t aShort) {
     uint8_t c[2];
     Endianess::writeUint16(&c[0], aShort);
     return Write(&c[0], 2);
   }
--- a/dom/media/CanvasCaptureMediaStream.cpp
+++ b/dom/media/CanvasCaptureMediaStream.cpp
@@ -98,17 +98,17 @@ class TimerDriver : public OutputStreamD
   void Forget() override {
     if (mTimer) {
       mTimer->Cancel();
       mTimer = nullptr;
     }
   }
 
  protected:
-  virtual ~TimerDriver() {}
+  virtual ~TimerDriver() = default;
 
  private:
   const double mFPS;
   nsCOMPtr<nsITimer> mTimer;
 };
 
 // ----------------------------------------------------------------------
 
@@ -125,17 +125,17 @@ class AutoDriver : public OutputStreamDr
     // This also means we should accept every frame as NewFrame is called only
     // after something changed.
 
     RefPtr<Image> image = aImage;
     SetImage(std::move(image), aTime);
   }
 
  protected:
-  virtual ~AutoDriver() {}
+  virtual ~AutoDriver() = default;
 };
 
 // ----------------------------------------------------------------------
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(CanvasCaptureMediaStream, DOMMediaStream,
                                    mCanvas)
 
 NS_IMPL_ADDREF_INHERITED(CanvasCaptureMediaStream, DOMMediaStream)
--- a/dom/media/ChannelMediaResource.h
+++ b/dom/media/ChannelMediaResource.h
@@ -161,17 +161,17 @@ class ChannelMediaResource
   }
 
   void GetDebugInfo(dom::MediaResourceDebugInfo& aInfo) override;
 
   class Listener final : public nsIStreamListener,
                          public nsIInterfaceRequestor,
                          public nsIChannelEventSink,
                          public nsIThreadRetargetableStreamListener {
-    ~Listener() {}
+    ~Listener() = default;
 
    public:
     Listener(ChannelMediaResource* aResource, int64_t aOffset, uint32_t aLoadID)
         : mMutex("Listener.mMutex"),
           mResource(aResource),
           mOffset(aOffset),
           mLoadID(aLoadID) {}
 
--- a/dom/media/CloneableWithRangeMediaResource.h
+++ b/dom/media/CloneableWithRangeMediaResource.h
@@ -18,17 +18,17 @@ class CloneableWithRangeMediaResource : 
                                   nsIInputStream* aStream, uint64_t aSize)
       : BaseMediaResource(aCallback, aChannel, aURI),
         mStream(do_QueryInterface(aStream)),
         mSize(aSize),
         mInitialized(false) {
     MOZ_ASSERT(mStream);
   }
 
-  ~CloneableWithRangeMediaResource() {}
+  ~CloneableWithRangeMediaResource() = default;
 
   // Main thread
   nsresult Open(nsIStreamListener** aStreamListener) override;
   RefPtr<GenericPromise> Close() override;
   void Suspend(bool aCloseImmediately) override {}
   void Resume() override {}
   already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
   bool HadCrossOriginRedirects() override;
--- a/dom/media/DOMMediaStream.cpp
+++ b/dom/media/DOMMediaStream.cpp
@@ -84,17 +84,17 @@ class DOMMediaStream::PlaybackTrackListe
       return;
     }
 
     MOZ_ASSERT(mStream->HasTrack(*aTrack));
     mStream->NotifyTrackRemoved(aTrack);
   }
 
  protected:
-  virtual ~PlaybackTrackListener() {}
+  virtual ~PlaybackTrackListener() = default;
 
   RefPtr<DOMMediaStream> mStream;
 };
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMMediaStream::PlaybackTrackListener,
                                      AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMMediaStream::PlaybackTrackListener,
                                        Release)
--- a/dom/media/DOMMediaStream.h
+++ b/dom/media/DOMMediaStream.h
@@ -57,17 +57,17 @@ class DOMMediaStream : public DOMEventTa
 
  public:
   typedef dom::MediaTrackConstraints MediaTrackConstraints;
 
   MOZ_DECLARE_WEAKREFERENCE_TYPENAME(DOMMediaStream)
 
   class TrackListener {
    public:
-    virtual ~TrackListener() {}
+    virtual ~TrackListener() = default;
 
     /**
      * Called when the DOMMediaStream has a live track added, either by
      * script (addTrack()) or the source creating one.
      */
     virtual void NotifyTrackAdded(const RefPtr<MediaStreamTrack>& aTrack){};
 
     /**
--- a/dom/media/FileBlockCache.h
+++ b/dom/media/FileBlockCache.h
@@ -116,17 +116,17 @@ class FileBlockCache : public MediaBlock
 
     bool IsMove() const { return mSourceBlockIndex != -1; }
     bool IsWrite() const {
       return mSourceBlockIndex == -1 && mData.get() != nullptr;
     }
 
    private:
     // Private destructor, to discourage deletion outside of Release():
-    ~BlockChange() {}
+    ~BlockChange() = default;
   };
 
  private:
   int64_t BlockIndexToOffset(int32_t aBlockIndex) {
     return static_cast<int64_t>(aBlockIndex) * BLOCK_SIZE;
   }
 
   void SetCacheFile(PRFileDesc* aFD);
--- a/dom/media/FileMediaResource.h
+++ b/dom/media/FileMediaResource.h
@@ -14,17 +14,17 @@ namespace mozilla {
 class FileMediaResource : public BaseMediaResource {
  public:
   FileMediaResource(MediaResourceCallback* aCallback, nsIChannel* aChannel,
                     nsIURI* aURI, int64_t aSize = -1 /* unknown size */)
       : BaseMediaResource(aCallback, aChannel, aURI),
         mSize(aSize),
         mLock("FileMediaResource.mLock"),
         mSizeInitialized(aSize != -1) {}
-  ~FileMediaResource() {}
+  ~FileMediaResource() = default;
 
   // Main thread
   nsresult Open(nsIStreamListener** aStreamListener) override;
   RefPtr<GenericPromise> Close() override;
   void Suspend(bool aCloseImmediately) override {}
   void Resume() override {}
   already_AddRefed<nsIPrincipal> GetCurrentPrincipal() override;
   bool HadCrossOriginRedirects() override;
--- a/dom/media/FrameStatistics.h
+++ b/dom/media/FrameStatistics.h
@@ -156,17 +156,17 @@ class FrameStatistics {
 
     FrameStatisticsData mStats;
 
    private:
     FrameStatistics* mFrameStats;
   };
 
  private:
-  ~FrameStatistics() {}
+  ~FrameStatistics() = default;
 
   // ReentrantMonitor to protect access of playback statistics.
   mutable ReentrantMonitor mReentrantMonitor;
 
   FrameStatisticsData mFrameStatisticsData;
 };
 
 }  // namespace mozilla
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -155,17 +155,17 @@ void ThreadedDriver::Shutdown() {
 SystemClockDriver::SystemClockDriver(GraphInterface* aGraphInterface,
                                      GraphDriver* aPreviousDriver,
                                      uint32_t aSampleRate)
     : ThreadedDriver(aGraphInterface, aPreviousDriver, aSampleRate),
       mInitialTimeStamp(TimeStamp::Now()),
       mCurrentTimeStamp(TimeStamp::Now()),
       mLastTimeStamp(TimeStamp::Now()) {}
 
-SystemClockDriver::~SystemClockDriver() {}
+SystemClockDriver::~SystemClockDriver() = default;
 
 void ThreadedDriver::RunThread() {
   mThreadRunning = true;
   while (true) {
     mIterationStart = mIterationEnd;
     mIterationEnd += GetIntervalForIteration();
 
     if (mStateComputedTime < mIterationEnd) {
@@ -262,17 +262,17 @@ TimeDuration SystemClockDriver::WaitInte
 
   return TimeDuration::FromMilliseconds(timeoutMS);
 }
 
 OfflineClockDriver::OfflineClockDriver(GraphInterface* aGraphInterface,
                                        uint32_t aSampleRate, GraphTime aSlice)
     : ThreadedDriver(aGraphInterface, nullptr, aSampleRate), mSlice(aSlice) {}
 
-OfflineClockDriver::~OfflineClockDriver() {}
+OfflineClockDriver::~OfflineClockDriver() = default;
 
 void OfflineClockDriver::RunThread() {
   nsCOMPtr<nsIThreadInternal> threadInternal = do_QueryInterface(mThread);
   nsCOMPtr<nsIThreadObserver> observer = do_QueryInterface(Graph());
   threadInternal->SetObserver(observer);
 
   ThreadedDriver::RunThread();
 }
@@ -287,17 +287,17 @@ AsyncCubebTask::AsyncCubebTask(AudioCall
       mDriver(aDriver),
       mOperation(aOperation),
       mShutdownGrip(aDriver->Graph()) {
   NS_WARNING_ASSERTION(
       mDriver->mAudioStream || aOperation == AsyncCubebOperation::INIT,
       "No audio stream!");
 }
 
-AsyncCubebTask::~AsyncCubebTask() {}
+AsyncCubebTask::~AsyncCubebTask() = default;
 
 NS_IMETHODIMP
 AsyncCubebTask::Run() {
   MOZ_ASSERT(mDriver);
 
   switch (mOperation) {
     case AsyncCubebOperation::INIT: {
       LOG(LogLevel::Debug, ("%p: AsyncCubebOperation::INIT driver=%p",
--- a/dom/media/Intervals.h
+++ b/dom/media/Intervals.h
@@ -243,18 +243,18 @@ class Interval {
 template <typename T>
 class IntervalSet {
  public:
   typedef IntervalSet<T> SelfType;
   typedef Interval<T> ElemType;
   typedef AutoTArray<ElemType, 4> ContainerType;
   typedef typename ContainerType::index_type IndexType;
 
-  IntervalSet() {}
-  virtual ~IntervalSet() {}
+  IntervalSet() = default;
+  virtual ~IntervalSet() = default;
 
   IntervalSet(const SelfType& aOther) : mIntervals(aOther.mIntervals) {}
 
   IntervalSet(SelfType&& aOther) {
     mIntervals.AppendElements(std::move(aOther.mIntervals));
   }
 
   explicit IntervalSet(const ElemType& aOther) {
--- a/dom/media/MediaBlockCacheBase.h
+++ b/dom/media/MediaBlockCacheBase.h
@@ -39,17 +39,17 @@ class MediaBlockCacheBase {
 
   static_assert(MediaCacheStream::BLOCK_SIZE <
                     static_cast<std::remove_const<decltype(
                         MediaCacheStream::BLOCK_SIZE)>::type>(INT32_MAX),
                 "MediaCacheStream::BLOCK_SIZE should fit in 31 bits");
   static const int32_t BLOCK_SIZE = MediaCacheStream::BLOCK_SIZE;
 
  protected:
-  virtual ~MediaBlockCacheBase() {}
+  virtual ~MediaBlockCacheBase() = default;
 
  public:
   // Initialize this cache.
   virtual nsresult Init() = 0;
 
   // Erase data and discard pending changes to reset the cache to its pristine
   // state as it was after Init().
   virtual void Flush() = 0;
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -88,18 +88,18 @@ class MediaCacheFlusher final : public n
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   static void RegisterMediaCache(MediaCache* aMediaCache);
   static void UnregisterMediaCache(MediaCache* aMediaCache);
 
  private:
-  MediaCacheFlusher() {}
-  ~MediaCacheFlusher() {}
+  MediaCacheFlusher() = default;
+  ~MediaCacheFlusher() = default;
 
   // Singleton instance created when a first MediaCache is registered, and
   // released when the last MediaCache is unregistered.
   // The observer service will keep a weak reference to it, for notifications.
   static StaticRefPtr<MediaCacheFlusher> gMediaCacheFlusher;
 
   nsTArray<MediaCache*> mMediaCaches;
 };
@@ -373,17 +373,17 @@ class MediaCache {
     PLAYED_BLOCK,
     // block belongs to the stream's mReadaheadBlockList because its
     // offset is greater than or equal to the stream's current
     // reader position
     READAHEAD_BLOCK
   };
 
   struct BlockOwner {
-    constexpr BlockOwner() {}
+    constexpr BlockOwner() = default;
 
     // The stream that owns this block, or null if the block is free.
     MediaCacheStream* mStream = nullptr;
     // The block index in the stream. Valid only if mStream is non-null.
     // Initialized to an insane value to highlight misuse.
     uint32_t mStreamBlock = UINT32_MAX;
     // Time at which this block was last used. Valid only if
     // mClass is METADATA_BLOCK or PLAYED_BLOCK.
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -219,17 +219,17 @@ VideoData::VideoData(int64_t aOffset, co
       mFrameID(aFrameID),
       mSentToCompositor(false),
       mNextKeyFrameTime(TimeUnit::Invalid()) {
   MOZ_ASSERT(!mDuration.IsNegative(), "Frame must have non-negative duration.");
   mKeyframe = aKeyframe;
   mTimecode = aTimecode;
 }
 
-VideoData::~VideoData() {}
+VideoData::~VideoData() = default;
 
 size_t VideoData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
   size_t size = aMallocSizeOf(this);
 
   // Currently only PLANAR_YCBCR has a well defined function for determining
   // it's size, so reporting is limited to that type.
   if (mImage && mImage->GetFormat() == ImageFormat::PLANAR_YCBCR) {
     const mozilla::layers::PlanarYCbCrImage* img =
@@ -477,17 +477,17 @@ already_AddRefed<MediaRawData> MediaRawD
     return nullptr;
   }
   if (!s->mAlphaBuffer.Append(mAlphaBuffer.Data(), mAlphaBuffer.Length())) {
     return nullptr;
   }
   return s.forget();
 }
 
-MediaRawData::~MediaRawData() {}
+MediaRawData::~MediaRawData() = default;
 
 size_t MediaRawData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
   size_t size = aMallocSizeOf(this);
   size += mBuffer.SizeOfExcludingThis(aMallocSizeOf);
   return size;
 }
 
 UniquePtr<MediaRawDataWriter> MediaRawData::CreateWriter() {
--- a/dom/media/MediaData.h
+++ b/dom/media/MediaData.h
@@ -323,17 +323,17 @@ class MediaData {
   ReturnType* As() {
     MOZ_ASSERT(this->mType == ReturnType::sType);
     return static_cast<ReturnType*>(this);
   }
 
  protected:
   explicit MediaData(Type aType) : mType(aType), mOffset(0), mKeyframe(false) {}
 
-  virtual ~MediaData() {}
+  virtual ~MediaData() = default;
 };
 
 // NullData is for decoder generating a sample which doesn't need to be
 // rendered.
 class NullData : public MediaData {
  public:
   NullData(int64_t aOffset, const media::TimeUnit& aTime,
            const media::TimeUnit& aDuration)
@@ -391,17 +391,17 @@ class AudioData : public MediaData {
   const AudioConfig::ChannelLayout::ChannelMap mChannelMap;
   const uint32_t mRate;
 
   // At least one of mAudioBuffer/mAudioData must be non-null.
   // mChannels channels, each with mFrames frames
   RefPtr<SharedBuffer> mAudioBuffer;
 
  protected:
-  ~AudioData() {}
+  ~AudioData() = default;
 
  private:
   AudioDataValue* GetAdjustedData() const;
   media::TimeUnit mOriginalTime;
   // mFrames frames, each with mChannels values
   AlignedAudioBuffer mAudioData;
   Maybe<media::TimeInterval> mTrimWindow;
   // Amount of frames for contained data.
@@ -671,14 +671,14 @@ class MediaRawData final : public MediaD
 
 // MediaByteBuffer is a ref counted infallible TArray.
 class MediaByteBuffer : public nsTArray<uint8_t> {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaByteBuffer);
   MediaByteBuffer() = default;
   explicit MediaByteBuffer(size_t aCapacity) : nsTArray<uint8_t>(aCapacity) {}
 
  private:
-  ~MediaByteBuffer() {}
+  ~MediaByteBuffer() = default;
 };
 
 }  // namespace mozilla
 
 #endif  // MediaData_h
--- a/dom/media/MediaDataDemuxer.h
+++ b/dom/media/MediaDataDemuxer.h
@@ -84,17 +84,17 @@ class MediaDataDemuxer : public DecoderD
   virtual void NotifyDataRemoved() {}
 
   // Indicate to MediaFormatReader if it should compute the start time
   // of the demuxed data. If true (default) the first sample returned will be
   // used as reference time base.
   virtual bool ShouldComputeStartTime() const { return true; }
 
  protected:
-  virtual ~MediaDataDemuxer() {}
+  virtual ~MediaDataDemuxer() = default;
 };
 
 class MediaTrackDemuxer : public DecoderDoctorLifeLogger<MediaTrackDemuxer> {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaTrackDemuxer)
 
   class SamplesHolder {
    public:
@@ -110,17 +110,17 @@ class MediaTrackDemuxer : public Decoder
     }
 
     // This method is only used to do the move semantic for mSamples, do not
     // append any element to the samples we returns. We should always append new
     // sample to mSamples via `AppendSample()`.
     nsTArray<RefPtr<MediaRawData>>& GetMovableSamples() { return mSamples; }
 
    private:
-    ~SamplesHolder() {}
+    ~SamplesHolder() = default;
     nsTArray<RefPtr<MediaRawData>> mSamples;
   };
 
   class SkipFailureHolder {
    public:
     SkipFailureHolder(const MediaResult& aFailure, uint32_t aSkipped)
         : mFailure(aFailure), mSkipped(aSkipped) {}
     MediaResult mFailure;
@@ -200,14 +200,14 @@ class MediaTrackDemuxer : public Decoder
     return INT64_MAX;
   }
 
   // If the MediaTrackDemuxer and MediaDataDemuxer hold cross references.
   // BreakCycles must be overridden.
   virtual void BreakCycles() {}
 
  protected:
-  virtual ~MediaTrackDemuxer() {}
+  virtual ~MediaTrackDemuxer() = default;
 };
 
 }  // namespace mozilla
 
 #endif  // MediaDataDemuxer_h
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1411,17 +1411,17 @@ RefPtr<GenericPromise> MediaDecoder::Req
           });
 }
 
 void MediaDecoder::NotifyAudibleStateChanged() {
   MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
   GetOwner()->SetAudibleState(mIsAudioDataAudible);
 }
 
-MediaMemoryTracker::MediaMemoryTracker() {}
+MediaMemoryTracker::MediaMemoryTracker() = default;
 
 void MediaMemoryTracker::InitMemoryReporter() {
   RegisterWeakAsyncMemoryReporter(this);
 }
 
 MediaMemoryTracker::~MediaMemoryTracker() {
   UnregisterWeakMemoryReporter(this);
 }
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -175,17 +175,17 @@ static void DiscardFramesFromTail(MediaQ
 // decoding is suspended.
 static TimeDuration SuspendBackgroundVideoDelay() {
   return TimeDuration::FromMilliseconds(
       StaticPrefs::media_suspend_bkgnd_video_delay_ms());
 }
 
 class MediaDecoderStateMachine::StateObject {
  public:
-  virtual ~StateObject() {}
+  virtual ~StateObject() = default;
   virtual void Exit() {}  // Exit action.
   virtual void Step() {}  // Perform a 'cycle' of this state object.
   virtual State GetState() const = 0;
 
   // Event handlers for various events.
   virtual void HandleAudioCaptured() {}
   virtual void HandleAudioDecoded(AudioData* aAudio) {
     Crash("Unexpected event!", __func__);
--- a/dom/media/MediaDeviceInfo.h
+++ b/dom/media/MediaDeviceInfo.h
@@ -41,17 +41,17 @@ class MediaDeviceInfo final : public nsI
   void GetGroupId(nsString& retval);
 
  private:
   MediaDeviceKind mKind;
   nsString mDeviceId;
   nsString mLabel;
   nsString mGroupId;
 
-  virtual ~MediaDeviceInfo() {}
+  virtual ~MediaDeviceInfo() = default;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(MediaDeviceInfo,
                               MOZILLA_DOM_MEDIADEVICEINFO_IMPLEMENTATION_IID)
 
 }  // namespace dom
 }  // namespace mozilla
 
--- a/dom/media/MediaEventSource.h
+++ b/dom/media/MediaEventSource.h
@@ -30,29 +30,29 @@ namespace mozilla {
  *
  * RevocableToken is not exposed to the client code directly.
  * Use MediaEventListener below to do the job.
  */
 class RevocableToken {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RevocableToken);
 
  public:
-  RevocableToken() : mRevoked(false) {}
+  RevocableToken() = default;
 
   void Revoke() { mRevoked = true; }
 
   bool IsRevoked() const { return mRevoked; }
 
  protected:
   // Virtual destructor is required since we might delete a Listener object
   // through its base type pointer.
-  virtual ~RevocableToken() {}
+  virtual ~RevocableToken() = default;
 
  private:
-  Atomic<bool> mRevoked;
+  Atomic<bool> mRevoked{false};
 };
 
 enum class ListenerPolicy : int8_t {
   // Allow at most one listener. Move will be used when possible
   // to pass the event data to save copy.
   Exclusive,
   // Allow multiple listeners. Event data will always be copied when passed
   // to the listeners.
@@ -259,17 +259,17 @@ class MediaEventSourceImpl;
  * MediaEventSource<T>::Connect() and call Disconnect() to disconnect the
  * listener from an event source.
  */
 class MediaEventListener {
   template <ListenerPolicy, typename... Ts>
   friend class MediaEventSourceImpl;
 
  public:
-  MediaEventListener() {}
+  MediaEventListener() = default;
 
   MediaEventListener(MediaEventListener&& aOther)
       : mToken(std::move(aOther.mToken)) {}
 
   MediaEventListener& operator=(MediaEventListener&& aOther) {
     MOZ_ASSERT(!mToken, "Must disconnect the listener.");
     mToken = std::move(aOther.mToken);
     return *this;
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -536,17 +536,17 @@ class MediaFormatReader::DemuxerProxy {
     uint32_t mNumVideoTrack = 0;
     RefPtr<Wrapper> mVideoDemuxer;
     bool mSeekable = false;
     bool mSeekableOnlyInBufferedRange = false;
     bool mShouldComputeStartTime = true;
     UniquePtr<EncryptionInfo> mCrypto;
 
    private:
-    ~Data() {}
+    ~Data() = default;
   };
   RefPtr<Data> mData;
 };
 
 class MediaFormatReader::DemuxerProxy::Wrapper : public MediaTrackDemuxer {
  public:
   Wrapper(MediaTrackDemuxer* aTrackDemuxer, TaskQueue* aTaskQueue)
       : mMutex("TrackDemuxer Mutex"),
--- a/dom/media/MediaFormatReader.h
+++ b/dom/media/MediaFormatReader.h
@@ -324,17 +324,17 @@ class MediaFormatReader final
     PartialDrainPending,
     DrainCompleted,
     DrainAborted,
   };
 
   class SharedShutdownPromiseHolder : public MozPromiseHolder<ShutdownPromise> {
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SharedShutdownPromiseHolder)
    private:
-    ~SharedShutdownPromiseHolder() {}
+    ~SharedShutdownPromiseHolder() = default;
   };
 
   struct DecoderData {
     DecoderData(MediaFormatReader* aOwner, MediaData::Type aType,
                 uint32_t aNumOfMaxError)
         : mOwner(aOwner),
           mType(aType),
           mMutex("DecoderData"),
--- a/dom/media/MediaInfo.h
+++ b/dom/media/MediaInfo.h
@@ -451,17 +451,17 @@ class TrackInfoSharedPtr {
     return mInfo ? mInfo->GetAsVideoInfo() : nullptr;
   }
 
   const TextInfo* GetAsTextInfo() const {
     return mInfo ? mInfo->GetAsTextInfo() : nullptr;
   }
 
  private:
-  ~TrackInfoSharedPtr() {}
+  ~TrackInfoSharedPtr() = default;
   UniquePtr<TrackInfo> mInfo;
   // A unique ID, guaranteed to change when changing streams.
   uint32_t mStreamSourceID;
 
  public:
   const nsCString& mMimeType;
 };
 
--- a/dom/media/MediaMIMETypes.h
+++ b/dom/media/MediaMIMETypes.h
@@ -95,17 +95,17 @@ class MediaMIMEType {
 
 Maybe<MediaMIMEType> MakeMediaMIMEType(const nsAString& aType);
 Maybe<MediaMIMEType> MakeMediaMIMEType(const nsACString& aType);
 Maybe<MediaMIMEType> MakeMediaMIMEType(const char* aType);
 
 // A list of case-sensitive codecs attached to a MediaExtendedMIMEType.
 class MediaCodecs {
  public:
-  MediaCodecs() {}
+  MediaCodecs() = default;
   // Construction from a comma-separated list of codecs. Unchecked.
   explicit MediaCodecs(const nsAString& aCodecs) : mCodecs(aCodecs) {}
   // Construction from a literal comma-separated list of codecs. Unchecked.
   template <size_t N>
   explicit MediaCodecs(const char (&aCodecs)[N])
       : mCodecs(NS_ConvertUTF8toUTF16(aCodecs, N - 1)) {}
 
   bool IsEmpty() const { return mCodecs.IsEmpty(); }
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -316,17 +316,17 @@ class MediaManager final : public nsIMed
                int32_t* aVal);
   void GetPrefBool(nsIPrefBranch* aBranch, const char* aPref, const char* aData,
                    bool* aVal);
   void GetPrefs(nsIPrefBranch* aBranch, const char* aData);
 
   // Make private because we want only one instance of this class
   explicit MediaManager(UniquePtr<base::Thread> aMediaThread);
 
-  ~MediaManager() {}
+  ~MediaManager() = default;
   void Shutdown();
 
   void StopScreensharing(uint64_t aWindowID);
 
   /**
    * Calls aCallback with a GetUserMediaWindowListener argument once for
    * each window listener associated with aWindow and its child windows.
    */
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -111,17 +111,17 @@ class MediaResource : public DecoderDoct
   /**
    * Fills aRanges with MediaByteRanges representing the data which is cached
    * in the media cache. Stream should be pinned during call and while
    * aRanges is being used.
    */
   virtual nsresult GetCachedRanges(MediaByteRangeSet& aRanges) = 0;
 
  protected:
-  virtual ~MediaResource(){};
+  virtual ~MediaResource() = default;
 
  private:
   void Destroy();
   mozilla::ThreadSafeAutoRefCnt mRefCnt;
   NS_DECL_OWNINGTHREAD
 };
 
 /**
--- a/dom/media/MediaResourceCallback.h
+++ b/dom/media/MediaResourceCallback.h
@@ -53,14 +53,14 @@ class MediaResourceCallback
 
   // Notify that the principal of MediaResource has changed.
   virtual void NotifyPrincipalChanged() {}
 
   // Notify that the "cache suspended" status of MediaResource changes.
   virtual void NotifySuspendedStatusChanged(bool aSuspendedByCache) {}
 
  protected:
-  virtual ~MediaResourceCallback() {}
+  virtual ~MediaResourceCallback() = default;
 };
 
 }  // namespace mozilla
 
 #endif  // MediaResourceCallback_h_
--- a/dom/media/MediaStreamError.h
+++ b/dom/media/MediaStreamError.h
@@ -63,17 +63,17 @@ class MediaMgrError final : public nsISu
  public:
   explicit MediaMgrError(Name aName, const nsAString& aMessage = EmptyString(),
                          const nsAString& aConstraint = EmptyString())
       : BaseMediaMgrError(aName, aMessage, aConstraint) {}
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
  private:
-  ~MediaMgrError() {}
+  ~MediaMgrError() = default;
 };
 
 namespace dom {
 class MediaStreamError final : public nsISupports,
                                public BaseMediaMgrError,
                                public nsWrapperCache {
  public:
   MediaStreamError(nsPIDOMWindowInner* aParent, Name aName,
@@ -93,17 +93,17 @@ class MediaStreamError final : public ns
                        JS::Handle<JSObject*> aGivenProto) override;
 
   nsPIDOMWindowInner* GetParentObject() const { return mParent; }
   void GetName(nsAString& aName) const;
   void GetMessage(nsAString& aMessage) const;
   void GetConstraint(nsAString& aConstraint) const;
 
  private:
-  virtual ~MediaStreamError() {}
+  virtual ~MediaStreamError() = default;
 
   RefPtr<nsPIDOMWindowInner> mParent;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(MediaStreamError,
                               MOZILLA_DOM_MEDIASTREAMERROR_IMPLEMENTATION_IID)
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/media/MediaStreamTrack.h
+++ b/dom/media/MediaStreamTrack.h
@@ -230,17 +230,17 @@ class MediaStreamTrackSource : public ns
       mStopped = true;
     }
     if (!mStopped) {
       SinkEnabledStateChanged();
     }
   }
 
  protected:
-  virtual ~MediaStreamTrackSource() {}
+  virtual ~MediaStreamTrackSource() = default;
 
   bool IsActive() {
     for (const WeakPtr<Sink>& sink : mSinks) {
       if (sink && sink->KeepsSourceAlive()) {
         return true;
       }
     }
     return false;
@@ -334,17 +334,17 @@ class BasicTrackSource : public MediaStr
 
   MediaSourceEnum GetMediaSource() const override { return mMediaSource; }
 
   void Stop() override {}
   void Disable() override {}
   void Enable() override {}
 
  protected:
-  ~BasicTrackSource() {}
+  ~BasicTrackSource() = default;
 
   const MediaSourceEnum mMediaSource;
 };
 
 /**
  * Base class that consumers of a MediaStreamTrack can use to get notifications
  * about state changes in the track.
  */
--- a/dom/media/MediaTrack.cpp
+++ b/dom/media/MediaTrack.cpp
@@ -16,17 +16,17 @@ MediaTrack::MediaTrack(nsIGlobalObject* 
                        const nsAString& aKind, const nsAString& aLabel,
                        const nsAString& aLanguage)
     : DOMEventTargetHelper(aOwnerGlobal),
       mId(aId),
       mKind(aKind),
       mLabel(aLabel),
       mLanguage(aLanguage) {}
 
-MediaTrack::~MediaTrack() {}
+MediaTrack::~MediaTrack() = default;
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(dom::MediaTrack, DOMEventTargetHelper, mList)
 
 NS_IMPL_ADDREF_INHERITED(dom::MediaTrack, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(dom::MediaTrack, DOMEventTargetHelper)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(dom::MediaTrack)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
--- a/dom/media/MediaTrackGraph.cpp
+++ b/dom/media/MediaTrackGraph.cpp
@@ -2319,17 +2319,17 @@ void MediaTrack::AddMainThreadListener(
 
     NS_IMETHOD Run() override {
       MOZ_ASSERT(NS_IsMainThread());
       mTrack->NotifyMainThreadListeners();
       return NS_OK;
     }
 
    private:
-    ~NotifyRunnable() {}
+    ~NotifyRunnable() = default;
 
     RefPtr<MediaTrack> mTrack;
   };
 
   nsCOMPtr<nsIRunnable> runnable = new NotifyRunnable(this);
   GraphImpl()->Dispatch(runnable.forget());
 }
 
@@ -2790,17 +2790,17 @@ void SourceMediaTrack::SetVolume(float a
   mVolume = aVolume;
 }
 
 float SourceMediaTrack::GetVolumeLocked() {
   mMutex.AssertCurrentThreadOwns();
   return mVolume;
 }
 
-SourceMediaTrack::~SourceMediaTrack() {}
+SourceMediaTrack::~SourceMediaTrack() = default;
 
 void MediaInputPort::Init() {
   LOG(LogLevel::Debug, ("%p: Adding MediaInputPort %p (from %p to %p)",
                         mSource->GraphImpl(), this, mSource, mDest));
   // Only connect the port if it wasn't disconnected on allocation.
   if (mSource) {
     mSource->AddConsumer(this);
     mDest->AddInput(this);
@@ -3189,17 +3189,17 @@ void MediaTrackGraphImpl::CollectSizesFo
       MediaTrackGraphImpl::FinishCollectReports(mHandleReport, mHandlerData,
                                                 std::move(mAudioTrackSizes));
       return NS_OK;
     }
 
     nsTArray<AudioNodeSizes> mAudioTrackSizes;
 
    private:
-    ~FinishCollectRunnable() {}
+    ~FinishCollectRunnable() = default;
 
     // Avoiding nsCOMPtr because NSCAP_ASSERT_NO_QUERY_NEEDED in its
     // constructor modifies the ref-count, which cannot be done off main
     // thread.
     RefPtr<nsIHandleReportCallback> mHandleReport;
     RefPtr<nsISupports> mHandlerData;
   };
 
--- a/dom/media/MediaTrackList.cpp
+++ b/dom/media/MediaTrackList.cpp
@@ -15,17 +15,17 @@
 
 namespace mozilla {
 namespace dom {
 
 MediaTrackList::MediaTrackList(nsIGlobalObject* aOwnerObject,
                                HTMLMediaElement* aMediaElement)
     : DOMEventTargetHelper(aOwnerObject), mMediaElement(aMediaElement) {}
 
-MediaTrackList::~MediaTrackList() {}
+MediaTrackList::~MediaTrackList() = default;
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(MediaTrackList, DOMEventTargetHelper,
                                    mTracks, mMediaElement)
 
 NS_IMPL_ADDREF_INHERITED(MediaTrackList, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(MediaTrackList, DOMEventTargetHelper)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MediaTrackList)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
--- a/dom/media/MediaTrackListener.h
+++ b/dom/media/MediaTrackListener.h
@@ -93,17 +93,17 @@ class MediaTrackListener {
 
   /**
    * Notify that this track listener has been removed from the graph, either
    * after shutdown or through MediaTrack::RemoveListener().
    */
   virtual void NotifyRemoved(MediaTrackGraph* aGraph) {}
 
  protected:
-  virtual ~MediaTrackListener() {}
+  virtual ~MediaTrackListener() = default;
 };
 
 /**
  * This is a base class for media graph thread listener direct callbacks from
  * within AppendToTrack(). It is bound to a certain track and can only be
  * installed on audio tracks. Once added to a track on any track in the graph,
  * the graph will try to install it at that track's source of media data.
  *
@@ -154,17 +154,17 @@ class DirectMediaTrackListener : public 
     TRACK_NOT_SUPPORTED,
     ALREADY_EXISTS,
     SUCCESS
   };
   virtual void NotifyDirectListenerInstalled(InstallationResult aResult) {}
   virtual void NotifyDirectListenerUninstalled() {}
 
  protected:
-  virtual ~DirectMediaTrackListener() {}
+  virtual ~DirectMediaTrackListener() = default;
 
   void MirrorAndDisableSegment(AudioSegment& aFrom, AudioSegment& aTo);
   void MirrorAndDisableSegment(VideoSegment& aFrom, VideoSegment& aTo,
                                DisabledTrackMode aMode);
   void NotifyRealtimeTrackDataAndApplyTrackDisabling(MediaTrackGraph* aGraph,
                                                      TrackTime aTrackOffset,
                                                      MediaSegment& aMedia);
 
--- a/dom/media/QueueObject.cpp
+++ b/dom/media/QueueObject.cpp
@@ -8,17 +8,17 @@
 #include "mozilla/AbstractThread.h"
 #include "mozilla/TaskQueue.h"
 #include "nsThreadUtils.h"
 
 namespace mozilla {
 
 QueueObject::QueueObject(RefPtr<AbstractThread> aThread) : mThread(aThread) {}
 
-QueueObject::~QueueObject() {}
+QueueObject::~QueueObject() = default;
 
 void QueueObject::Dispatch(nsIRunnable* aRunnable) {
   Dispatch(do_AddRef(aRunnable));
 }
 
 void QueueObject::Dispatch(already_AddRefed<nsIRunnable> aRunnable) {
   mThread->Dispatch(std::move(aRunnable));
 }
--- a/dom/media/ReaderProxy.cpp
+++ b/dom/media/ReaderProxy.cpp
@@ -18,17 +18,17 @@ ReaderProxy::ReaderProxy(AbstractThread*
       mWatchManager(this, aReader->OwnerThread()),
       mDuration(aReader->OwnerThread(), media::NullableTimeUnit(),
                 "ReaderProxy::mDuration (Mirror)") {
   // Must support either heuristic buffering or WaitForData().
   MOZ_ASSERT(mReader->UseBufferingHeuristics() ||
              mReader->IsWaitForDataSupported());
 }
 
-ReaderProxy::~ReaderProxy() {}
+ReaderProxy::~ReaderProxy() = default;
 
 media::TimeUnit ReaderProxy::StartTime() const {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
   return mStartTime.ref();
 }
 
 RefPtr<ReaderProxy::MetadataPromise> ReaderProxy::ReadMetadata() {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
--- a/dom/media/SharedBuffer.h
+++ b/dom/media/SharedBuffer.h
@@ -37,17 +37,17 @@ class ThreadSharedObject {
   }
 
   virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
  protected:
   // Protected destructor, to discourage deletion outside of Release():
-  virtual ~ThreadSharedObject() {}
+  virtual ~ThreadSharedObject() = default;
 };
 
 /**
  * Heap-allocated chunk of arbitrary data with threadsafe refcounting.
  * Typically you would allocate one of these, fill it in, and then treat it as
  * immutable while it's shared.
  * This only guarantees 4-byte alignment of the data. For alignment we simply
  * assume that the memory from malloc is at least 4-byte aligned and the
--- a/dom/media/TextTrack.cpp
+++ b/dom/media/TextTrack.cpp
@@ -106,17 +106,17 @@ TextTrack::TextTrack(nsPIDOMWindowInner*
       mLabel(aLabel),
       mLanguage(aLanguage),
       mMode(aMode),
       mReadyState(aReadyState),
       mTextTrackSource(aTextTrackSource) {
   SetDefaultSettings();
 }
 
-TextTrack::~TextTrack() {}
+TextTrack::~TextTrack() = default;
 
 void TextTrack::SetDefaultSettings() {
   nsPIDOMWindowInner* ownerWindow = GetOwner();
   mCueList = new TextTrackCueList(ownerWindow);
   mActiveCueList = new TextTrackCueList(ownerWindow);
   mCuePos = 0;
   mDirty = false;
 }
--- a/dom/media/TextTrackCue.cpp
+++ b/dom/media/TextTrackCue.cpp
@@ -84,17 +84,17 @@ TextTrackCue::TextTrackCue(nsPIDOMWindow
   LOG("create TextTrackCue");
   SetDefaultCueSettings();
   MOZ_ASSERT(aOwnerWindow);
   if (NS_FAILED(StashDocument())) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
   }
 }
 
-TextTrackCue::~TextTrackCue() {}
+TextTrackCue::~TextTrackCue() = default;
 
 /** Save a reference to our creating document so we don't have to
  *  keep getting it from our window.
  */
 nsresult TextTrackCue::StashDocument() {
   nsPIDOMWindowInner* window = GetOwner();
   if (!window) {
     return NS_ERROR_NO_INTERFACE;
--- a/dom/media/TextTrackCueList.cpp
+++ b/dom/media/TextTrackCueList.cpp
@@ -26,17 +26,17 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(TextTrac
 NS_IMPL_CYCLE_COLLECTING_RELEASE(TextTrackCueList)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TextTrackCueList)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 TextTrackCueList::TextTrackCueList(nsISupports* aParent) : mParent(aParent) {}
 
-TextTrackCueList::~TextTrackCueList() {}
+TextTrackCueList::~TextTrackCueList() = default;
 
 JSObject* TextTrackCueList::WrapObject(JSContext* aCx,
                                        JS::Handle<JSObject*> aGivenProto) {
   return TextTrackCueList_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 TextTrackCue* TextTrackCueList::IndexedGetter(uint32_t aIndex, bool& aFound) {
   aFound = aIndex < mList.Length();
--- a/dom/media/TextTrackList.cpp
+++ b/dom/media/TextTrackList.cpp
@@ -28,17 +28,17 @@ NS_INTERFACE_MAP_END_INHERITING(DOMEvent
 TextTrackList::TextTrackList(nsPIDOMWindowInner* aOwnerWindow)
     : DOMEventTargetHelper(aOwnerWindow) {}
 
 TextTrackList::TextTrackList(nsPIDOMWindowInner* aOwnerWindow,
                              TextTrackManager* aTextTrackManager)
     : DOMEventTargetHelper(aOwnerWindow),
       mTextTrackManager(aTextTrackManager) {}
 
-TextTrackList::~TextTrackList() {}
+TextTrackList::~TextTrackList() = default;
 
 void TextTrackList::GetShowingCues(nsTArray<RefPtr<TextTrackCue>>& aCues) {
   // Only Subtitles and Captions can show on the screen.
   nsTArray<RefPtr<TextTrackCue>> cues;
   for (uint32_t i = 0; i < Length(); i++) {
     if (mTextTracks[i]->Mode() == TextTrackMode::Showing &&
         (mTextTracks[i]->Kind() == TextTrackKind::Subtitles ||
          mTextTracks[i]->Kind() == TextTrackKind::Captions)) {
--- a/dom/media/TextTrackRegion.h
+++ b/dom/media/TextTrackRegion.h
@@ -105,17 +105,17 @@ class TextTrackRegion final : public nsI
   // Helper to aid copying of a given TextTrackRegion's width, lines,
   // anchor, viewport and scroll values.
   void CopyValues(TextTrackRegion& aRegion);
 
   // -----helpers-------
   const nsAString& Id() const { return mId; }
 
  private:
-  ~TextTrackRegion() {}
+  ~TextTrackRegion() = default;
 
   nsCOMPtr<nsISupports> mParent;
   nsString mId;
   double mWidth;
   long mLines;
   double mRegionAnchorX;
   double mRegionAnchorY;
   double mViewportAnchorX;
--- a/dom/media/TimeUnits.h
+++ b/dom/media/TimeUnits.h
@@ -183,17 +183,17 @@ class TimeUnit final {
   }
   friend TimeUnit operator%(const TimeUnit& aUnit, int64_t aVal) {
     MOZ_DIAGNOSTIC_ASSERT(0 <= aVal && aVal <= UINT32_MAX);
     return TimeUnit(aUnit.mValue % aVal);
   }
 
   bool IsValid() const { return mValue.isValid(); }
 
-  constexpr TimeUnit() : mValue(CheckedInt64(0)) {}
+  constexpr TimeUnit() = default;
 
   TimeUnit(const TimeUnit&) = default;
 
   TimeUnit& operator=(const TimeUnit&) = default;
 
   bool IsPosInf() const {
     return mValue.isValid() && mValue.value() == INT64_MAX;
   }
@@ -201,17 +201,17 @@ class TimeUnit final {
     return mValue.isValid() && mValue.value() == INT64_MIN;
   }
 
  private:
   explicit constexpr TimeUnit(CheckedInt64 aMicroseconds)
       : mValue(aMicroseconds) {}
 
   // Our internal representation is in microseconds.
-  CheckedInt64 mValue;
+  CheckedInt64 mValue{0};
 };
 
 typedef Maybe<TimeUnit> NullableTimeUnit;
 
 typedef Interval<TimeUnit> TimeInterval;
 
 class TimeIntervals : public IntervalSet<TimeUnit> {
  public:
--- a/dom/media/VideoFrameContainer.cpp
+++ b/dom/media/VideoFrameContainer.cpp
@@ -47,17 +47,17 @@ VideoFrameContainer::VideoFrameContainer
       mFrameID(0),
       mPendingPrincipalHandle(PRINCIPAL_HANDLE_NONE),
       mFrameIDForPendingPrincipalHandle(0),
       mMainThread(aOwner->AbstractMainThread()) {
   NS_ASSERTION(aOwner, "aOwner must not be null");
   NS_ASSERTION(mImageContainer, "aContainer must not be null");
 }
 
-VideoFrameContainer::~VideoFrameContainer() {}
+VideoFrameContainer::~VideoFrameContainer() = default;
 
 PrincipalHandle VideoFrameContainer::GetLastPrincipalHandle() {
   MutexAutoLock lock(mMutex);
   return GetLastPrincipalHandleLocked();
 }
 
 PrincipalHandle VideoFrameContainer::GetLastPrincipalHandleLocked() {
   return mLastPrincipalHandle;
--- a/dom/media/VideoPlaybackQuality.h
+++ b/dom/media/VideoPlaybackQuality.h
@@ -31,17 +31,17 @@ class VideoPlaybackQuality final : publi
 
   DOMHighResTimeStamp CreationTime() const { return mCreationTime; }
 
   uint32_t TotalVideoFrames() const { return mTotalFrames; }
 
   uint32_t DroppedVideoFrames() const { return mDroppedFrames; }
 
  private:
-  ~VideoPlaybackQuality() {}
+  ~VideoPlaybackQuality() = default;
 
   RefPtr<HTMLMediaElement> mElement;
   DOMHighResTimeStamp mCreationTime;
   uint32_t mTotalFrames;
   uint32_t mDroppedFrames;
 };
 
 }  // namespace dom
--- a/dom/media/VideoSegment.cpp
+++ b/dom/media/VideoSegment.cpp
@@ -22,17 +22,17 @@ VideoFrame::VideoFrame(already_AddRefed<
       mForceBlack(false),
       mPrincipalHandle(PRINCIPAL_HANDLE_NONE) {}
 
 VideoFrame::VideoFrame()
     : mIntrinsicSize(0, 0),
       mForceBlack(false),
       mPrincipalHandle(PRINCIPAL_HANDLE_NONE) {}
 
-VideoFrame::~VideoFrame() {}
+VideoFrame::~VideoFrame() = default;
 
 void VideoFrame::SetNull() {
   mImage = nullptr;
   mIntrinsicSize = gfx::IntSize(0, 0);
   mPrincipalHandle = PRINCIPAL_HANDLE_NONE;
 }
 
 void VideoFrame::TakeFrom(VideoFrame* aFrame) {
@@ -104,11 +104,11 @@ void VideoSegment::AppendFrame(already_A
 }
 
 VideoSegment::VideoSegment()
     : MediaSegmentBase<VideoSegment, VideoChunk>(VIDEO) {}
 
 VideoSegment::VideoSegment(VideoSegment&& aSegment)
     : MediaSegmentBase<VideoSegment, VideoChunk>(std::move(aSegment)) {}
 
-VideoSegment::~VideoSegment() {}
+VideoSegment::~VideoSegment() = default;
 
 }  // namespace mozilla
--- a/dom/media/VideoUtils.h
+++ b/dom/media/VideoUtils.h
@@ -86,17 +86,17 @@ class MOZ_STACK_CLASS ReentrantMonitorCo
   ReentrantMonitor* mReentrantMonitor;
 };
 
 // Shuts down a thread asynchronously.
 class ShutdownThreadEvent : public Runnable {
  public:
   explicit ShutdownThreadEvent(nsIThread* aThread)
       : Runnable("ShutdownThreadEvent"), mThread(aThread) {}
-  ~ShutdownThreadEvent() {}
+  ~ShutdownThreadEvent() = default;
   NS_IMETHOD Run() override {
     mThread->Shutdown();
     mThread = nullptr;
     return NS_OK;
   }
 
  private:
   nsCOMPtr<nsIThread> mThread;
@@ -305,17 +305,17 @@ class SimpleTimer : public nsITimerCallb
   static already_AddRefed<SimpleTimer> Create(
       nsIRunnable* aTask, uint32_t aTimeoutMs,
       nsIEventTarget* aTarget = nullptr);
   void Cancel();
 
   NS_IMETHOD Notify(nsITimer* timer) override;
 
  private:
-  virtual ~SimpleTimer() {}
+  virtual ~SimpleTimer() = default;
   nsresult Init(nsIRunnable* aTask, uint32_t aTimeoutMs,
                 nsIEventTarget* aTarget);
 
   RefPtr<nsIRunnable> mTask;
   nsCOMPtr<nsITimer> mTimer;
 };
 
 void LogToBrowserConsole(const nsAString& aMsg);
--- a/dom/media/doctor/DDLifetimes.h
+++ b/dom/media/doctor/DDLifetimes.h
@@ -94,17 +94,17 @@ class DDLifetimes {
   class DDLogObjectHashKey : public PLDHashEntryHdr {
    public:
     typedef const DDLogObject& KeyType;
     typedef const DDLogObject* KeyTypePointer;
 
     explicit DDLogObjectHashKey(KeyTypePointer aKey) : mValue(*aKey) {}
     DDLogObjectHashKey(const DDLogObjectHashKey& aToCopy)
         : mValue(aToCopy.mValue) {}
-    ~DDLogObjectHashKey() {}
+    ~DDLogObjectHashKey() = default;
 
     KeyType GetKey() const { return mValue; }
     bool KeyEquals(KeyTypePointer aKey) const { return *aKey == mValue; }
 
     static KeyTypePointer KeyToPointer(KeyType aKey) { return &aKey; }
     static PLDHashNumber HashKey(KeyTypePointer aKey) {
       return HashBytes(aKey, sizeof(DDLogObject));
     }
--- a/dom/media/eme/CDMCaps.cpp
+++ b/dom/media/eme/CDMCaps.cpp
@@ -6,19 +6,19 @@
 
 #include "mozilla/CDMCaps.h"
 #include "mozilla/EMEUtils.h"
 #include "nsThreadUtils.h"
 #include "SamplesWaitingForKey.h"
 
 namespace mozilla {
 
-CDMCaps::CDMCaps() {}
+CDMCaps::CDMCaps() = default;
 
-CDMCaps::~CDMCaps() {}
+CDMCaps::~CDMCaps() = default;
 
 // Keys with MediaKeyStatus::Usable, MediaKeyStatus::Output_downscaled,
 // or MediaKeyStatus::Output_restricted status can be used by the CDM
 // to decrypt or decrypt-and-decode samples.
 static bool IsUsableStatus(dom::MediaKeyStatus aStatus) {
   return aStatus == dom::MediaKeyStatus::Usable ||
          aStatus == dom::MediaKeyStatus::Output_restricted ||
          aStatus == dom::MediaKeyStatus::Output_downscaled;
--- a/dom/media/eme/MediaKeyError.cpp
+++ b/dom/media/eme/MediaKeyError.cpp
@@ -11,17 +11,17 @@
 namespace mozilla {
 namespace dom {
 
 MediaKeyError::MediaKeyError(EventTarget* aOwner, uint32_t aSystemCode)
     : Event(aOwner, nullptr, nullptr), mSystemCode(aSystemCode) {
   InitEvent(NS_LITERAL_STRING("error"), CanBubble::eNo, Cancelable::eNo);
 }
 
-MediaKeyError::~MediaKeyError() {}
+MediaKeyError::~MediaKeyError() = default;
 
 uint32_t MediaKeyError::SystemCode() const { return mSystemCode; }
 
 JSObject* MediaKeyError::WrapObjectInternal(JSContext* aCx,
                                             JS::Handle<JSObject*> aGivenProto) {
   return MediaKeyError_Binding::Wrap(aCx, this, aGivenProto);
 }
 
--- a/dom/media/eme/MediaKeyStatusMap.cpp
+++ b/dom/media/eme/MediaKeyStatusMap.cpp
@@ -20,17 +20,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(MediaKeyStatusMap, mParent)
 
 MediaKeyStatusMap::MediaKeyStatusMap(nsPIDOMWindowInner* aParent)
     : mParent(aParent) {}
 
-MediaKeyStatusMap::~MediaKeyStatusMap() {}
+MediaKeyStatusMap::~MediaKeyStatusMap() = default;
 
 JSObject* MediaKeyStatusMap::WrapObject(JSContext* aCx,
                                         JS::Handle<JSObject*> aGivenProto) {
   return MediaKeyStatusMap_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 nsPIDOMWindowInner* MediaKeyStatusMap::GetParentObject() const {
   return mParent;
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -53,17 +53,17 @@ MediaKeySystemAccess::MediaKeySystemAcce
     nsPIDOMWindowInner* aParent, const nsAString& aKeySystem,
     const MediaKeySystemConfiguration& aConfig)
     : mParent(aParent), mKeySystem(aKeySystem), mConfig(aConfig) {
   EME_LOG("Created MediaKeySystemAccess for keysystem=%s config=%s",
           NS_ConvertUTF16toUTF8(mKeySystem).get(),
           mozilla::dom::ToCString(mConfig).get());
 }
 
-MediaKeySystemAccess::~MediaKeySystemAccess() {}
+MediaKeySystemAccess::~MediaKeySystemAccess() = default;
 
 JSObject* MediaKeySystemAccess::WrapObject(JSContext* aCx,
                                            JS::Handle<JSObject*> aGivenProto) {
   return MediaKeySystemAccess_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 nsPIDOMWindowInner* MediaKeySystemAccess::GetParentObject() const {
   return mParent;
--- a/dom/media/encoder/EncodedFrame.h
+++ b/dom/media/encoder/EncodedFrame.h
@@ -55,17 +55,17 @@ class EncodedFrame final {
       return mTime + FramesToUsecs(mDuration, 48000).value();
     } else {
       return mTime + mDuration;
     }
   }
 
  private:
   // Private destructor, to discourage deletion outside of Release():
-  ~EncodedFrame() {}
+  ~EncodedFrame() = default;
 
   // Encoded data
   nsTArray<uint8_t> mFrameData;
 };
 
 }  // namespace mozilla
 
 #endif  // EncodedFrame_h_
--- a/dom/media/encoder/MediaEncoder.h
+++ b/dom/media/encoder/MediaEncoder.h
@@ -38,17 +38,17 @@ class MediaEncoderListener {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaEncoderListener)
   virtual void Initialized() = 0;
   virtual void DataAvailable() = 0;
   virtual void Error() = 0;
   virtual void Shutdown() = 0;
 
  protected:
-  virtual ~MediaEncoderListener() {}
+  virtual ~MediaEncoderListener() = default;
 };
 
 /**
  * MediaEncoder is the framework of encoding module, it controls and manages
  * procedures between ContainerWriter and TrackEncoder. ContainerWriter packs
  * the encoded track data with a specific container (e.g. ogg, webm).
  * AudioTrackEncoder and VideoTrackEncoder are subclasses of TrackEncoder, and
  * are responsible for encoding raw data coming from MediaTrackGraph.
--- a/dom/media/encoder/TrackEncoder.h
+++ b/dom/media/encoder/TrackEncoder.h
@@ -36,17 +36,17 @@ class TrackEncoderListener {
 
   /**
    * Called after the TrackEncoder hit an unexpected error, causing it to
    * abort operation.
    */
   virtual void Error(TrackEncoder* aEncoder) = 0;
 
  protected:
-  virtual ~TrackEncoderListener() {}
+  virtual ~TrackEncoderListener() = default;
 };
 
 /**
  * Base class of AudioTrackEncoder and VideoTrackEncoder. Lifetime managed by
  * MediaEncoder. All methods are to be called only on the worker thread.
  *
  * MediaTrackListeners will get store raw data in mIncomingBuffer, so
  * mIncomingBuffer is protected by a lock. The control APIs are all called by
--- a/dom/media/encoder/TrackMetadataBase.h
+++ b/dom/media/encoder/TrackMetadataBase.h
@@ -25,17 +25,17 @@ class TrackMetadataBase {
     METADATA_EVRC,
     METADATA_UNKNOWN  // Metadata Kind not set
   };
   // Return the specific metadata kind
   virtual MetadataKind GetKind() const = 0;
 
  protected:
   // Protected destructor, to discourage deletion outside of Release():
-  virtual ~TrackMetadataBase() {}
+  virtual ~TrackMetadataBase() = default;
 };
 
 // The base class for audio metadata.
 class AudioTrackMetadata : public TrackMetadataBase {
  public:
   // The duration of each sample set generated by encoder. (counted by samples)
   // If the duration is variant, this value should return 0.
   virtual uint32_t GetAudioFrameDuration() = 0;
--- a/dom/media/fake-cdm/cdm-test-decryptor.h
+++ b/dom/media/fake-cdm/cdm-test-decryptor.h
@@ -94,14 +94,14 @@ class FakeDecryptor : public cdm::Conten
 
   static void Message(const std::string& aMessage);
 
   cdm::Host_10* mHost;
 
   static FakeDecryptor* sInstance;
 
  private:
-  virtual ~FakeDecryptor() {}
+  virtual ~FakeDecryptor() = default;
 
   void TestStorage();
 };
 
 #endif
--- a/dom/media/fake-cdm/cdm-test-storage.h
+++ b/dom/media/fake-cdm/cdm-test-storage.h
@@ -14,17 +14,17 @@
 #include "stddef.h"
 #include "content_decryption_module.h"
 
 #define IO_SUCCEEDED(x) ((x) == cdm::FileIOClient::Status::kSuccess)
 #define IO_FAILED(x) ((x) != cdm::FileIOClient::Status::kSuccess)
 
 class ReadContinuation {
  public:
-  virtual ~ReadContinuation() {}
+  virtual ~ReadContinuation() = default;
   virtual void operator()(bool aSuccess, const uint8_t* aData,
                           uint32_t aDataSize) = 0;
 };
 
 void WriteRecord(cdm::Host_10* aHost, const std::string& aRecordName,
                  const std::string& aData, std::function<void()>&& aOnSuccess,
                  std::function<void()>&& aOnFailure);
 
@@ -34,15 +34,15 @@ void WriteRecord(cdm::Host_10* aHost, co
                  std::function<void()>&& aOnFailure);
 
 void ReadRecord(
     cdm::Host_10* aHost, const std::string& aRecordName,
     std::function<void(bool, const uint8_t*, uint32_t)>&& aOnReadComplete);
 
 class OpenContinuation {
  public:
-  virtual ~OpenContinuation() {}
+  virtual ~OpenContinuation() = default;
   virtual void operator()(bool aSuccess) = 0;
 };
 
 void OpenRecord(cdm::Host_10* aHost, const std::string& aRecordName,
                 std::function<void(bool)>&& aOpenComplete);
 #endif  // TEST_CDM_STORAGE_H__
--- a/dom/media/flac/FlacDemuxer.cpp
+++ b/dom/media/flac/FlacDemuxer.cpp
@@ -585,17 +585,17 @@ bool FlacDemuxer::IsSeekable() const {
 
 // FlacTrackDemuxer
 FlacTrackDemuxer::FlacTrackDemuxer(MediaResource* aSource)
     : mSource(aSource), mParser(new flac::FrameParser()), mTotalFrameLen(0) {
   DDLINKCHILD("source", aSource);
   Reset();
 }
 
-FlacTrackDemuxer::~FlacTrackDemuxer() {}
+FlacTrackDemuxer::~FlacTrackDemuxer() = default;
 
 bool FlacTrackDemuxer::Init() {
   static const int BUFFER_SIZE = 4096;
 
   // First check if we have a valid Flac start.
   char buffer[BUFFER_SIZE];
   const uint8_t* ubuffer =  // only needed due to type constraints of ReadAt.
       reinterpret_cast<uint8_t*>(buffer);
--- a/dom/media/flac/FlacFrameParser.cpp
+++ b/dom/media/flac/FlacFrameParser.cpp
@@ -34,17 +34,17 @@ FlacFrameParser::FlacFrameParser()
     : mMinBlockSize(0),
       mMaxBlockSize(0),
       mMinFrameSize(0),
       mMaxFrameSize(0),
       mNumFrames(0),
       mFullMetadata(false),
       mPacketCount(0) {}
 
-FlacFrameParser::~FlacFrameParser() {}
+FlacFrameParser::~FlacFrameParser() = default;
 
 uint32_t FlacFrameParser::HeaderBlockLength(const uint8_t* aPacket) const {
   uint32_t extra = 4;
   if (aPacket[0] == 'f') {
     // This must be the first block read, which contains the fLaC signature.
     aPacket += 4;
     extra += 4;
   }
--- a/dom/media/gmp/ChromiumCDMAdapter.h
+++ b/dom/media/gmp/ChromiumCDMAdapter.h
@@ -40,17 +40,17 @@ class HostFile {
 
 struct HostFileData {
   HostFileData(HostFile&& aBinary, HostFile&& aSig)
       : mBinary(std::move(aBinary)), mSig(std::move(aSig)) {}
 
   HostFileData(HostFileData&& aOther)
       : mBinary(std::move(aOther.mBinary)), mSig(std::move(aOther.mSig)) {}
 
-  ~HostFileData() {}
+  ~HostFileData() = default;
 
   HostFile mBinary;
   HostFile mSig;
 };
 
 class ChromiumCDMAdapter : public gmp::GMPAdapter {
  public:
   explicit ChromiumCDMAdapter(
--- a/dom/media/gmp/ChromiumCDMCallback.h
+++ b/dom/media/gmp/ChromiumCDMCallback.h
@@ -9,17 +9,17 @@
 #include "mozilla/CDMProxy.h"
 #include "mozilla/ErrorResult.h"                      // For ErrorResult
 #include "mozilla/dom/MediaKeyStatusMapBinding.h"     // For MediaKeyStatus
 #include "mozilla/dom/MediaKeyMessageEventBinding.h"  // For MediaKeyMessageType
 #include "mozilla/gmp/GMPTypes.h"                     // For CDMKeyInformation
 
 class ChromiumCDMCallback {
  public:
-  virtual ~ChromiumCDMCallback() {}
+  virtual ~ChromiumCDMCallback() = default;
 
   virtual void SetSessionId(uint32_t aPromiseId,
                             const nsCString& aSessionId) = 0;
 
   virtual void ResolveLoadSessionPromise(uint32_t aPromiseId,
                                          bool aSuccessful) = 0;
 
   virtual void ResolvePromiseWithKeyStatus(uint32_t aPromiseId,
--- a/dom/media/gmp/ChromiumCDMParent.h
+++ b/dom/media/gmp/ChromiumCDMParent.h
@@ -85,17 +85,17 @@ class ChromiumCDMParent final : public P
 
   RefPtr<MediaDataDecoder::DecodePromise> Drain();
 
   RefPtr<ShutdownPromise> ShutdownVideoDecoder();
 
   void Shutdown();
 
  protected:
-  ~ChromiumCDMParent() {}
+  ~ChromiumCDMParent() = default;
 
   ipc::IPCResult Recv__delete__() override;
   ipc::IPCResult RecvOnResolvePromiseWithKeyStatus(const uint32_t& aPromiseId,
                                                    const uint32_t& aKeyStatus);
   ipc::IPCResult RecvOnResolveNewSessionPromise(const uint32_t& aPromiseId,
                                                 const nsCString& aSessionId);
   ipc::IPCResult RecvResolveLoadSessionPromise(const uint32_t& aPromiseId,
                                                const bool& aSuccessful);
--- a/dom/media/gmp/DecryptJob.h
+++ b/dom/media/gmp/DecryptJob.h
@@ -22,15 +22,15 @@ class DecryptJob {
   void PostResult(DecryptStatus aResult);
 
   RefPtr<DecryptPromise> Ensure();
 
   const uint32_t mId;
   RefPtr<MediaRawData> mSample;
 
  private:
-  ~DecryptJob() {}
+  ~DecryptJob() = default;
   MozPromiseHolder<DecryptPromise> mPromise;
 };
 
 }  // namespace mozilla
 
 #endif  // DecryptJob_h_
--- a/dom/media/gmp/GMPCallbackBase.h
+++ b/dom/media/gmp/GMPCallbackBase.h
@@ -3,17 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GMPCallbackBase_h_
 #define GMPCallbackBase_h_
 
 class GMPCallbackBase {
  public:
-  virtual ~GMPCallbackBase() {}
+  virtual ~GMPCallbackBase() = default;
 
   // The GMP code will call this if the codec crashes or shuts down.  It's
   // expected that the consumer (destination of this callback) will respond
   // by dropping their reference to the proxy, allowing the proxy/parent to
   // be destroyed.
   virtual void Terminated() = 0;
 };
 
--- a/dom/media/gmp/GMPLoader.cpp
+++ b/dom/media/gmp/GMPLoader.cpp
@@ -147,17 +147,17 @@ class WinSandboxStarter : public mozilla
   }
 };
 #endif
 
 #if defined(XP_LINUX) && defined(MOZ_SANDBOX)
 namespace {
 class LinuxSandboxStarter : public mozilla::gmp::SandboxStarter {
  private:
-  LinuxSandboxStarter() {}
+  LinuxSandboxStarter() = default;
   friend mozilla::detail::UniqueSelector<LinuxSandboxStarter>::SingleObject
   mozilla::MakeUnique<LinuxSandboxStarter>();
 
  public:
   static UniquePtr<SandboxStarter> Make() {
     if (mozilla::SandboxInfo::Get().CanSandboxMedia()) {
       return MakeUnique<LinuxSandboxStarter>();
     }
--- a/dom/media/gmp/GMPLoader.h
+++ b/dom/media/gmp/GMPLoader.h
@@ -16,24 +16,24 @@
 #  include "mozilla/Sandbox.h"
 #endif
 
 namespace mozilla {
 namespace gmp {
 
 class SandboxStarter {
  public:
-  virtual ~SandboxStarter() {}
+  virtual ~SandboxStarter() = default;
   virtual bool Start(const char* aLibPath) = 0;
 };
 
 // Interface that adapts a plugin to the GMP API.
 class GMPAdapter {
  public:
-  virtual ~GMPAdapter() {}
+  virtual ~GMPAdapter() = default;
   // Sets the adapted to plugin library module.
   // Note: the GMPAdapter is responsible for calling PR_UnloadLibrary on aLib
   // when it's finished with it.
   virtual void SetAdaptee(PRLibrary* aLib) = 0;
 
   // These are called in place of the corresponding GMP API functions.
   virtual GMPErr GMPInit(const GMPPlatformAPI* aPlatformAPI) = 0;
   virtual GMPErr GMPGetAPI(const char* aAPIName, void* aHostAPI,
--- a/dom/media/gmp/GMPParent.h
+++ b/dom/media/gmp/GMPParent.h
@@ -22,17 +22,17 @@
 #include "nsIFile.h"
 #include "mozilla/MozPromise.h"
 
 namespace mozilla {
 namespace gmp {
 
 class GMPCapability {
  public:
-  explicit GMPCapability() {}
+  explicit GMPCapability() = default;
   GMPCapability(GMPCapability&& aOther)
       : mAPIName(std::move(aOther.mAPIName)),
         mAPITags(std::move(aOther.mAPITags)) {}
   explicit GMPCapability(const nsCString& aAPIName) : mAPIName(aAPIName) {}
   explicit GMPCapability(const GMPCapability& aOther) = default;
   nsCString mAPIName;
   nsTArray<nsCString> mAPITags;
 
--- a/dom/media/gmp/GMPPlatform.cpp
+++ b/dom/media/gmp/GMPPlatform.cpp
@@ -34,17 +34,17 @@ class GMPRunnable final {
 
   void Run() {
     mTask->Run();
     mTask->Destroy();
     mTask = nullptr;
   }
 
  private:
-  ~GMPRunnable() {}
+  ~GMPRunnable() = default;
 
   GMPTask* mTask;
 };
 
 class GMPSyncRunnable final {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPSyncRunnable)
 
@@ -77,17 +77,17 @@ class GMPSyncRunnable final {
     mTask->Destroy();
     mTask = nullptr;
     MonitorAutoLock lock(mMonitor);
     mDone = true;
     lock.Notify();
   }
 
  private:
-  ~GMPSyncRunnable() {}
+  ~GMPSyncRunnable() = default;
 
   bool mDone;
   GMPTask* mTask;
   MessageLoop* mMessageLoop;
   Monitor mMonitor;
 };
 
 class GMPThreadImpl : public GMPThread {
@@ -257,17 +257,17 @@ void GMPMutexImpl::Acquire() { mMonitor.
 void GMPMutexImpl::Release() { mMonitor.Exit(); }
 
 GMPTask* NewGMPTask(std::function<void()>&& aFunction) {
   class Task : public GMPTask {
    public:
     explicit Task(std::function<void()>&& aFunction)
         : mFunction(std::move(aFunction)) {}
     void Destroy() override { delete this; }
-    ~Task() override {}
+    ~Task() override = default;
     void Run() override { mFunction(); }
 
    private:
     std::function<void()> mFunction;
   };
   return new Task(std::move(aFunction));
 }
 
--- a/dom/media/gmp/GMPProcessChild.cpp
+++ b/dom/media/gmp/GMPProcessChild.cpp
@@ -13,17 +13,17 @@
 using mozilla::ipc::IOThreadChild;
 
 namespace mozilla {
 namespace gmp {
 
 GMPProcessChild::GMPProcessChild(ProcessId aParentPid)
     : ProcessChild(aParentPid) {}
 
-GMPProcessChild::~GMPProcessChild() {}
+GMPProcessChild::~GMPProcessChild() = default;
 
 bool GMPProcessChild::Init(int aArgc, char* aArgv[]) {
   nsAutoString pluginFilename;
 
 #if defined(OS_POSIX)
   // NB: need to be very careful in ensuring that the first arg
   // (after the binary name) here is indeed the plugin module path.
   // Keep in sync with dom/plugins/PluginModuleParent.
--- a/dom/media/gmp/GMPService.cpp
+++ b/dom/media/gmp/GMPService.cpp
@@ -139,17 +139,17 @@ GeckoMediaPluginService::GeckoMediaPlugi
         NS_SUCCEEDED(appInfo->GetAppBuildID(buildID))) {
       GMP_LOG_DEBUG(
           "GeckoMediaPluginService created; Gecko version=%s buildID=%s",
           version.get(), buildID.get());
     }
   }
 }
 
-GeckoMediaPluginService::~GeckoMediaPluginService() {}
+GeckoMediaPluginService::~GeckoMediaPluginService() = default;
 
 NS_IMETHODIMP
 GeckoMediaPluginService::RunPluginCrashCallbacks(
     uint32_t aPluginId, const nsACString& aPluginName) {
   MOZ_ASSERT(NS_IsMainThread());
   GMP_LOG_DEBUG("%s::%s(%i)", __CLASS__, __FUNCTION__, aPluginId);
 
   mozilla::UniquePtr<nsTArray<RefPtr<GMPCrashHelper>>> helpers;
--- a/dom/media/gmp/GMPServiceChild.cpp
+++ b/dom/media/gmp/GMPServiceChild.cpp
@@ -417,19 +417,19 @@ void GeckoMediaPluginServiceChild::Remov
     mServiceChild->RemoveGMPContentParent(aGMPContentParent);
     if (mShuttingDownOnGMPThread && !mServiceChild->HaveContentParents()) {
       mServiceChild->Close();
       mServiceChild = nullptr;
     }
   }
 }
 
-GMPServiceChild::GMPServiceChild() {}
+GMPServiceChild::GMPServiceChild() = default;
 
-GMPServiceChild::~GMPServiceChild() {}
+GMPServiceChild::~GMPServiceChild() = default;
 
 already_AddRefed<GMPContentParent> GMPServiceChild::GetBridgedGMPContentParent(
     ProcessId aOtherPid, ipc::Endpoint<PGMPContentParent>&& endpoint) {
   RefPtr<GMPContentParent> parent;
   mContentParents.Get(aOtherPid, getter_AddRefs(parent));
 
   if (parent) {
     return parent.forget();
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -522,17 +522,17 @@ class NotifyObserversTask final : public
     MOZ_ASSERT(obsService);
     if (obsService) {
       obsService->NotifyObservers(nullptr, mTopic, mData.get());
     }
     return NS_OK;
   }
 
  private:
-  ~NotifyObserversTask() {}
+  ~NotifyObserversTask() = default;
   const char* mTopic;
   const nsString mData;
 };
 
 NS_IMETHODIMP
 GeckoMediaPluginServiceParent::PathRunnable::Run() {
   mService->RemoveOnGMPThread(mPath, mOperation == REMOVE_AND_DELETE_FROM_DISK,
                               mDefer);
--- a/dom/media/gmp/GMPServiceParent.h
+++ b/dom/media/gmp/GMPServiceParent.h
@@ -90,17 +90,17 @@ class GeckoMediaPluginServiceParent fina
   void CrashPlugins();
   void NotifySyncShutdownComplete();
 
   void RemoveOnGMPThread(const nsAString& aDirectory,
                          const bool aDeleteFromDisk, const bool aCanDefer);
 
   struct DirectoryFilter {
     virtual bool operator()(nsIFile* aPath) = 0;
-    ~DirectoryFilter() {}
+    ~DirectoryFilter() = default;
   };
   void ClearNodeIdAndPlugin(DirectoryFilter& aFilter);
   void ClearNodeIdAndPlugin(nsIFile* aPluginStorageDir,
                             DirectoryFilter& aFilter);
   void ForgetThisSiteOnGMPThread(
       const nsACString& aOrigin,
       const mozilla::OriginAttributesPattern& aPattern);
   void ClearRecentHistoryOnGMPThread(PRTime aSince);
--- a/dom/media/gmp/GMPSharedMemManager.h
+++ b/dom/media/gmp/GMPSharedMemManager.h
@@ -30,32 +30,32 @@ class GMPSharedMem {
   static const uint32_t kGMPBufLimit = 20;
 
   GMPSharedMem() {
     for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]);
          i++) {
       mGmpAllocated[i] = 0;
     }
   }
-  virtual ~GMPSharedMem() {}
+  virtual ~GMPSharedMem() = default;
 
   // Parent and child impls will differ here
   virtual void CheckThread() = 0;
 
  protected:
   friend class GMPSharedMemManager;
 
   nsTArray<ipc::Shmem> mGmpFreelist[GMPSharedMem::kGMPNumTypes];
   uint32_t mGmpAllocated[GMPSharedMem::kGMPNumTypes];
 };
 
 class GMPSharedMemManager {
  public:
   explicit GMPSharedMemManager(GMPSharedMem* aData) : mData(aData) {}
-  virtual ~GMPSharedMemManager() {}
+  virtual ~GMPSharedMemManager() = default;
 
   virtual bool MgrAllocShmem(GMPSharedMem::GMPMemoryClasses aClass,
                              size_t aSize,
                              ipc::Shmem::SharedMemory::SharedMemoryType aType,
                              ipc::Shmem* aMem);
   virtual bool MgrDeallocShmem(GMPSharedMem::GMPMemoryClasses aClass,
                                ipc::Shmem& aMem);
 
--- a/dom/media/gmp/GMPStorage.h
+++ b/dom/media/gmp/GMPStorage.h
@@ -23,17 +23,17 @@ class GMPStorage {
   virtual bool IsOpen(const nsCString& aRecordName) const = 0;
   virtual GMPErr Read(const nsCString& aRecordName,
                       nsTArray<uint8_t>& aOutBytes) = 0;
   virtual GMPErr Write(const nsCString& aRecordName,
                        const nsTArray<uint8_t>& aBytes) = 0;
   virtual void Close(const nsCString& aRecordName) = 0;
 
  protected:
-  virtual ~GMPStorage() {}
+  virtual ~GMPStorage() = default;
 };
 
 already_AddRefed<GMPStorage> CreateGMPMemoryStorage();
 already_AddRefed<GMPStorage> CreateGMPDiskStorage(const nsCString& aNodeId,
                                                   const nsString& aGMPName);
 
 }  // namespace gmp
 }  // namespace mozilla
--- a/dom/media/gmp/GMPStorageChild.h
+++ b/dom/media/gmp/GMPStorageChild.h
@@ -35,17 +35,17 @@ class GMPRecordImpl : public GMPRecord {
 
   const nsCString& Name() const { return mName; }
 
   void OpenComplete(GMPErr aStatus);
   void ReadComplete(GMPErr aStatus, const uint8_t* aBytes, uint32_t aLength);
   void WriteComplete(GMPErr aStatus);
 
  private:
-  ~GMPRecordImpl() {}
+  ~GMPRecordImpl() = default;
   const nsCString mName;
   GMPRecordClient* const mClient;
   GMPStorageChild* const mOwner;
 };
 
 class GMPStorageChild : public PGMPStorageChild {
   friend class PGMPStorageChild;
 
@@ -66,17 +66,17 @@ class GMPStorageChild : public PGMPStora
 
   GMPErr Close(const nsCString& aRecordName);
 
  private:
   bool HasRecord(const nsCString& aRecordName);
   already_AddRefed<GMPRecordImpl> GetRecord(const nsCString& aRecordName);
 
  protected:
-  ~GMPStorageChild() {}
+  ~GMPStorageChild() = default;
 
   // PGMPStorageChild
   mozilla::ipc::IPCResult RecvOpenComplete(const nsCString& aRecordName,
                                            const GMPErr& aStatus);
   mozilla::ipc::IPCResult RecvReadComplete(const nsCString& aRecordName,
                                            const GMPErr& aStatus,
                                            nsTArray<uint8_t>&& aBytes);
   mozilla::ipc::IPCResult RecvWriteComplete(const nsCString& aRecordName,
--- a/dom/media/gmp/GMPStorageParent.h
+++ b/dom/media/gmp/GMPStorageParent.h
@@ -28,17 +28,17 @@ class GMPStorageParent : public PGMPStor
   mozilla::ipc::IPCResult RecvOpen(const nsCString& aRecordName) override;
   mozilla::ipc::IPCResult RecvRead(const nsCString& aRecordName) override;
   mozilla::ipc::IPCResult RecvWrite(const nsCString& aRecordName,
                                     nsTArray<uint8_t>&& aBytes) override;
   mozilla::ipc::IPCResult RecvClose(const nsCString& aRecordName) override;
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  private:
-  ~GMPStorageParent() {}
+  ~GMPStorageParent() = default;
 
   RefPtr<GMPStorage> mStorage;
 
   const nsCString mNodeId;
   RefPtr<GMPParent> mPlugin;
   // True after Shutdown(), or if Init() has not completed successfully.
   bool mShutdown;
 };
--- a/dom/media/gmp/GMPTimerParent.h
+++ b/dom/media/gmp/GMPTimerParent.h
@@ -26,17 +26,17 @@ class GMPTimerParent : public PGMPTimerP
   void Shutdown();
 
  protected:
   mozilla::ipc::IPCResult RecvSetTimer(const uint32_t& aTimerId,
                                        const uint32_t& aTimeoutMs);
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
  private:
-  ~GMPTimerParent() {}
+  ~GMPTimerParent() = default;
 
   static void GMPTimerExpired(nsITimer* aTimer, void* aClosure);
 
   struct Context {
     Context() : mId(0) { MOZ_COUNT_CTOR(Context); }
     MOZ_COUNTED_DTOR(Context)
     nsCOMPtr<nsITimer> mTimer;
     RefPtr<GMPTimerParent>
--- a/dom/media/gmp/GMPVideoDecoderParent.cpp
+++ b/dom/media/gmp/GMPVideoDecoderParent.cpp
@@ -41,17 +41,17 @@ GMPVideoDecoderParent::GMPVideoDecoderPa
       mPlugin(aPlugin),
       mCallback(nullptr),
       mVideoHost(this),
       mPluginId(aPlugin->GetPluginId()),
       mFrameCount(0) {
   MOZ_ASSERT(mPlugin);
 }
 
-GMPVideoDecoderParent::~GMPVideoDecoderParent() {}
+GMPVideoDecoderParent::~GMPVideoDecoderParent() = default;
 
 GMPVideoHostImpl& GMPVideoDecoderParent::Host() { return mVideoHost; }
 
 // Note: may be called via Terminated()
 void GMPVideoDecoderParent::Close() {
   GMP_LOG_DEBUG("GMPVideoDecoderParent[%p]::Close()", this);
   MOZ_ASSERT(!mPlugin || mPlugin->GMPEventTarget()->IsOnCurrentThread());
 
--- a/dom/media/gmp/GMPVideoDecoderProxy.h
+++ b/dom/media/gmp/GMPVideoDecoderProxy.h
@@ -12,17 +12,17 @@
 #include "gmp-video-frame-encoded.h"
 
 #include "GMPCallbackBase.h"
 #include "GMPUtils.h"
 
 class GMPVideoDecoderCallbackProxy : public GMPCallbackBase,
                                      public GMPVideoDecoderCallback {
  public:
-  virtual ~GMPVideoDecoderCallbackProxy() {}
+  virtual ~GMPVideoDecoderCallbackProxy() = default;
 };
 
 // A proxy to GMPVideoDecoder in the child process.
 // GMPVideoDecoderParent exposes this to users the GMP.
 // This enables Gecko to pass nsTArrays to the child GMP and avoid
 // an extra copy when doing so.
 
 // The consumer must call Close() when done with the codec, or when
--- a/dom/media/gmp/GMPVideoEncoderParent.h
+++ b/dom/media/gmp/GMPVideoEncoderParent.h
@@ -58,17 +58,17 @@ class GMPVideoEncoderParent : public GMP
     return AllocShmem(aSize, aType, aMem);
 #else
     return AllocUnsafeShmem(aSize, aType, aMem);
 #endif
   }
   void Dealloc(Shmem&& aMem) override { DeallocShmem(aMem); }
 
  private:
-  virtual ~GMPVideoEncoderParent(){};
+  virtual ~GMPVideoEncoderParent() = default;
 
   // PGMPVideoEncoderParent
   void ActorDestroy(ActorDestroyReason aWhy) override;
   mozilla::ipc::IPCResult RecvEncoded(
       const GMPVideoEncodedFrameData& aEncodedFrame,
       nsTArray<uint8_t>&& aCodecSpecificInfo) override;
   mozilla::ipc::IPCResult RecvError(const GMPErr& aError) override;
   mozilla::ipc::IPCResult RecvShutdown() override;
--- a/dom/media/gmp/GMPVideoEncoderProxy.h
+++ b/dom/media/gmp/GMPVideoEncoderProxy.h
@@ -11,17 +11,17 @@
 #include "gmp-video-frame-i420.h"
 #include "gmp-video-frame-encoded.h"
 
 #include "GMPCallbackBase.h"
 #include "GMPUtils.h"
 
 class GMPVideoEncoderCallbackProxy : public GMPCallbackBase {
  public:
-  virtual ~GMPVideoEncoderCallbackProxy() {}
+  virtual ~GMPVideoEncoderCallbackProxy() = default;
   virtual void Encoded(GMPVideoEncodedFrame* aEncodedFrame,
                        const nsTArray<uint8_t>& aCodecSpecificInfo) = 0;
   virtual void Error(GMPErr aError) = 0;
 };
 
 // A proxy to GMPVideoEncoder in the child process.
 // GMPVideoEncoderParent exposes this to users the GMP.
 // This enables Gecko to pass nsTArrays to the child GMP and avoid
--- a/dom/media/gmp/GMPVideoHost.cpp
+++ b/dom/media/gmp/GMPVideoHost.cpp
@@ -9,17 +9,17 @@
 #include "GMPVideoEncodedFrameImpl.h"
 
 namespace mozilla {
 namespace gmp {
 
 GMPVideoHostImpl::GMPVideoHostImpl(GMPSharedMemManager* aSharedMemMgr)
     : mSharedMemMgr(aSharedMemMgr) {}
 
-GMPVideoHostImpl::~GMPVideoHostImpl() {}
+GMPVideoHostImpl::~GMPVideoHostImpl() = default;
 
 GMPErr GMPVideoHostImpl::CreateFrame(GMPVideoFrameFormat aFormat,
                                      GMPVideoFrame** aFrame) {
   if (!mSharedMemMgr) {
     return GMPGenericErr;
   }
 
   if (!aFrame) {
--- a/dom/media/gmp/GMPVideoi420FrameImpl.cpp
+++ b/dom/media/gmp/GMPVideoi420FrameImpl.cpp
@@ -28,17 +28,17 @@ GMPVideoi420FrameImpl::GMPVideoi420Frame
       mVPlane(aFrameData.mVPlane(), aHost),
       mWidth(aFrameData.mWidth()),
       mHeight(aFrameData.mHeight()),
       mTimestamp(aFrameData.mTimestamp()),
       mDuration(aFrameData.mDuration()) {
   MOZ_ASSERT(aHost);
 }
 
-GMPVideoi420FrameImpl::~GMPVideoi420FrameImpl() {}
+GMPVideoi420FrameImpl::~GMPVideoi420FrameImpl() = default;
 
 bool GMPVideoi420FrameImpl::InitFrameData(GMPVideoi420FrameData& aFrameData) {
   mYPlane.InitPlaneData(aFrameData.mYPlane());
   mUPlane.InitPlaneData(aFrameData.mUPlane());
   mVPlane.InitPlaneData(aFrameData.mVPlane());
   aFrameData.mWidth() = mWidth;
   aFrameData.mHeight() = mHeight;
   aFrameData.mTimestamp() = mTimestamp;
--- a/dom/media/gmp/gmp-api/gmp-platform.h
+++ b/dom/media/gmp/gmp-api/gmp-platform.h
@@ -37,32 +37,32 @@
 #include "gmp-storage.h"
 #include <stdint.h>
 
 /* Platform helper API. */
 
 class GMPTask {
  public:
   virtual void Destroy() = 0;  // Deletes object.
-  virtual ~GMPTask() {}
+  virtual ~GMPTask() = default;
   virtual void Run() = 0;
 };
 
 class GMPThread {
  public:
-  virtual ~GMPThread() {}
+  virtual ~GMPThread() = default;
   virtual void Post(GMPTask* aTask) = 0;
   virtual void Join() = 0;  // Deletes object after join completes.
 };
 
 // A re-entrant monitor; can be locked from the same thread multiple times.
 // Must be unlocked the same number of times it's locked.
 class GMPMutex {
  public:
-  virtual ~GMPMutex() {}
+  virtual ~GMPMutex() = default;
   virtual void Acquire() = 0;
   virtual void Release() = 0;
   virtual void Destroy() = 0;  // Deletes object.
 };
 
 // Time is defined as the number of milliseconds since the
 // Epoch (00:00:00 UTC, January 1, 1970).
 typedef int64_t GMPTimestamp;
--- a/dom/media/gmp/gmp-api/gmp-storage.h
+++ b/dom/media/gmp/gmp-api/gmp-storage.h
@@ -59,17 +59,17 @@ class GMPRecord {
   virtual GMPErr Write(const uint8_t* aData, uint32_t aDataSize) = 0;
 
   // Closes a record, deletes the GMPRecord object. The GMPRecord object
   // must not be used after this is called, request a new one with
   // GMPPlatformAPI->openstorage to re-open this record. Cancels all
   // callbacks.
   virtual GMPErr Close() = 0;
 
-  virtual ~GMPRecord() {}
+  virtual ~GMPRecord() = default;
 };
 
 // Callback object that receives the results of GMPRecord calls. Callbacks
 // run asynchronously to the GMPRecord call, on the main thread.
 class GMPRecordClient {
  public:
   // Response to a GMPRecord::Open() call with the open |status|.
   // aStatus values:
@@ -99,12 +99,12 @@ class GMPRecordClient {
   // - GMPNoErr - File contents written successfully.
   // - GMPRecordInUse - There are other operations or clients in use on
   //   this record.
   // - GMPGenericErr - Unspecified error.
   // If aStatus is not GMPNoErr, the GMPRecord is unusable, and you must
   // call Close() on the GMPRecord to dispose of it.
   virtual void WriteComplete(GMPErr aStatus) = 0;
 
-  virtual ~GMPRecordClient() {}
+  virtual ~GMPRecordClient() = default;
 };
 
 #endif  // GMP_STORAGE_h_
--- a/dom/media/gmp/widevine-adapter/content_decryption_module.h
+++ b/dom/media/gmp/widevine-adapter/content_decryption_module.h
@@ -462,18 +462,18 @@ class CDM_CLASS_API Buffer {
   virtual void Destroy() = 0;
 
   virtual uint32_t Capacity() const = 0;
   virtual uint8_t* Data() = 0;
   virtual void SetSize(uint32_t size) = 0;
   virtual uint32_t Size() const = 0;
 
  protected:
-  Buffer() {}
-  virtual ~Buffer() {}
+  Buffer() = default;
+  virtual ~Buffer() = default;
 
  private:
   Buffer(const Buffer&);
   void operator=(const Buffer&);
 };
 
 // Represents a decrypted block that has not been decoded.
 class CDM_CLASS_API DecryptedBlock {
@@ -482,18 +482,18 @@ class CDM_CLASS_API DecryptedBlock {
   virtual Buffer* DecryptedBuffer() = 0;
 
   // TODO(tomfinegan): Figure out if timestamp is really needed. If it is not,
   // we can just pass Buffer pointers around.
   virtual void SetTimestamp(int64_t timestamp) = 0;
   virtual int64_t Timestamp() const = 0;
 
  protected:
-  DecryptedBlock() {}
-  virtual ~DecryptedBlock() {}
+  DecryptedBlock() = default;
+  virtual ~DecryptedBlock() = default;
 };
 
 class CDM_CLASS_API VideoFrame {
  public:
   enum VideoPlane : uint32_t {
     kYPlane = 0,
     kUPlane = 1,
     kVPlane = 2,
@@ -514,18 +514,18 @@ class CDM_CLASS_API VideoFrame {
 
   virtual void SetStride(VideoPlane plane, uint32_t stride) = 0;
   virtual uint32_t Stride(VideoPlane plane) = 0;
 
   virtual void SetTimestamp(int64_t timestamp) = 0;
   virtual int64_t Timestamp() const = 0;
 
  protected:
-  VideoFrame() {}
-  virtual ~VideoFrame() {}
+  VideoFrame() = default;
+  virtual ~VideoFrame() = default;
 };
 
 // Represents decrypted and decoded audio frames. AudioFrames can contain
 // multiple audio output buffers, which are serialized into this format:
 //
 // |<------------------- serialized audio buffer ------------------->|
 // | int64_t timestamp | int64_t length | length bytes of audio data |
 //
@@ -541,18 +541,18 @@ class CDM_CLASS_API AudioFrames {
 
   // The CDM must call this method, providing a valid format, when providing
   // frame buffers. Planar data should be stored end to end; e.g.,
   // |ch1 sample1||ch1 sample2|....|ch1 sample_last||ch2 sample1|...
   virtual void SetFormat(AudioFormat format) = 0;
   virtual AudioFormat Format() const = 0;
 
  protected:
-  AudioFrames() {}
-  virtual ~AudioFrames() {}
+  AudioFrames() = default;
+  virtual ~AudioFrames() = default;
 };
 
 // FileIO interface provides a way for the CDM to store data in a file in
 // persistent storage. This interface aims only at providing basic read/write
 // capabilities and should not be used as a full fledged file IO API.
 // Each CDM and origin (e.g. HTTPS, "foo.example.com", 443) combination has
 // its own persistent storage. All instances of a given CDM associated with a
 // given origin share the same persistent storage.
@@ -587,18 +587,18 @@ class CDM_CLASS_API FileIO {
   virtual void Write(const uint8_t* data, uint32_t data_size) = 0;
 
   // Closes the file if opened, destroys this FileIO object and releases any
   // resources allocated. The CDM must call this method when it finished using
   // this object. A FileIO object must not be used after Close() is called.
   virtual void Close() = 0;
 
  protected:
-  FileIO() {}
-  virtual ~FileIO() {}
+  FileIO() = default;
+  virtual ~FileIO() = default;
 };
 
 // Responses to FileIO calls. All responses will be called asynchronously.
 // When kError is returned, the FileIO object could be in an error state. All
 // following calls (other than Close()) could return kError. The CDM should
 // still call Close() to destroy the FileIO object.
 class CDM_CLASS_API FileIOClient {
  public:
@@ -623,18 +623,18 @@ class CDM_CLASS_API FileIOClient {
   //   successfully.
   // - kInUse indicates that there are other read/write operations pending.
   // - kError indicates write failure, e.g. the storage is not open or cannot be
   //   fully written. Upon write failure, the contents of the file should be
   //   regarded as corrupt and should not used.
   virtual void OnWriteComplete(Status status) = 0;
 
  protected:
-  FileIOClient() {}
-  virtual ~FileIOClient() {}
+  FileIOClient() = default;
+  virtual ~FileIOClient() = default;
 };
 
 class CDM_CLASS_API Host_9;
 class CDM_CLASS_API Host_10;
 class CDM_CLASS_API Host_11;
 
 // ContentDecryptionModule interface that all CDMs need to implement.
 // The interface is versioned for backward compatibility.
@@ -834,18 +834,18 @@ class CDM_CLASS_API ContentDecryptionMod
   virtual void OnStorageId(uint32_t version,
                            const uint8_t* storage_id,
                            uint32_t storage_id_size) = 0;
 
   // Destroys the object in the same context as it was created.
   virtual void Destroy() = 0;
 
  protected:
-  ContentDecryptionModule_9() {}
-  virtual ~ContentDecryptionModule_9() {}
+  ContentDecryptionModule_9() = default;
+  virtual ~ContentDecryptionModule_9() = default;
 };
 
 // ContentDecryptionModule interface that all CDMs need to implement.
 // The interface is versioned for backward compatibility.
 // Note: ContentDecryptionModule implementations must use the allocator
 // provided in CreateCdmInstance() to allocate any Buffer that needs to
 // be passed back to the caller. Implementations must call Buffer::Destroy()
 // when a Buffer is created that will never be returned to the caller.
@@ -1054,18 +1054,18 @@ class CDM_CLASS_API ContentDecryptionMod
   virtual void OnStorageId(uint32_t version,
                            const uint8_t* storage_id,
                            uint32_t storage_id_size) = 0;
 
   // Destroys the object in the same context as it was created.
   virtual void Destroy() = 0;
 
  protected:
-  ContentDecryptionModule_10() {}
-  virtual ~ContentDecryptionModule_10() {}
+  ContentDecryptionModule_10() = default;
+  virtual ~ContentDecryptionModule_10() = default;
 };
 
 // ----- Note: CDM interface(s) below still in development and not stable! -----
 
 // ContentDecryptionModule interface that all CDMs need to implement.
 // The interface is versioned for backward compatibility.
 // Note: ContentDecryptionModule implementations must use the allocator
 // provided in CreateCdmInstance() to allocate any Buffer that needs to
@@ -1276,18 +1276,18 @@ class CDM_CLASS_API ContentDecryptionMod
   virtual void OnStorageId(uint32_t version,
                            const uint8_t* storage_id,
                            uint32_t storage_id_size) = 0;
 
   // Destroys the object in the same context as it was created.
   virtual void Destroy() = 0;
 
  protected:
-  ContentDecryptionModule_11() {}
-  virtual ~ContentDecryptionModule_11() {}
+  ContentDecryptionModule_11() = default;
+  virtual ~ContentDecryptionModule_11() = default;
 };
 
 class CDM_CLASS_API Host_9 {
  public:
   static const int kVersion = 9;
 
   // Returns a Buffer* containing non-zero members upon success, or NULL on
   // failure. The caller owns the Buffer* after this call. The buffer is not
@@ -1409,18 +1409,18 @@ class CDM_CLASS_API Host_9 {
   // ID will be returned by the host via ContentDecryptionModule::OnStorageId().
   // If |version| is 0, the latest version will be returned. All |version|s
   // that are greater than or equal to 0x80000000 are reserved for the CDM and
   // should not be supported or returned by the host. The CDM must not expose
   // the ID outside the client device, even in encrypted form.
   virtual void RequestStorageId(uint32_t version) = 0;
 
  protected:
-  Host_9() {}
-  virtual ~Host_9() {}
+  Host_9() = default;
+  virtual ~Host_9() = default;
 };
 
 class CDM_CLASS_API Host_10 {
  public:
   static const int kVersion = 10;
 
   // Returns a Buffer* containing non-zero members upon success, or NULL on
   // failure. The caller owns the Buffer* after this call. The buffer is not
@@ -1545,18 +1545,18 @@ class CDM_CLASS_API Host_10 {
   // ID will be returned by the host via ContentDecryptionModule::OnStorageId().
   // If |version| is 0, the latest version will be returned. All |version|s
   // that are greater than or equal to 0x80000000 are reserved for the CDM and
   // should not be supported or returned by the host. The CDM must not expose
   // the ID outside the client device, even in encrypted form.
   virtual void RequestStorageId(uint32_t version) = 0;
 
  protected:
-  Host_10() {}
-  virtual ~Host_10() {}
+  Host_10() = default;
+  virtual ~Host_10() = default;
 };
 
 class CDM_CLASS_API Host_11 {
  public:
   static const int kVersion = 11;
 
   // Returns a Buffer* containing non-zero members upon success, or NULL on
   // failure. The caller owns the Buffer* after this call. The buffer is not
@@ -1694,15 +1694,15 @@ class CDM_CLASS_API Host_11 {
   // ID will be returned by the host via ContentDecryptionModule::OnStorageId().
   // If |version| is 0, the latest version will be returned. All |version|s
   // that are greater than or equal to 0x80000000 are reserved for the CDM and
   // should not be supported or returned by the host. The CDM must not expose
   // the ID outside the client device, even in encrypted form.
   virtual void RequestStorageId(uint32_t version) = 0;
 
  protected:
-  Host_11() {}
-  virtual ~Host_11() {}
+  Host_11() = default;
+  virtual ~Host_11() = default;
 };
 
 }  // namespace cdm
 
 #endif  // CDM_CONTENT_DECRYPTION_MODULE_H_
--- a/dom/media/gmp/widevine-adapter/content_decryption_module_proxy.h
+++ b/dom/media/gmp/widevine-adapter/content_decryption_module_proxy.h
@@ -61,18 +61,18 @@ class CDM_CLASS_API CdmProxy {
                       uint32_t key_blob_size) = 0;
 
   // Removes a key for the session identified by |crypto_session_id|.
   virtual void RemoveKey(uint32_t crypto_session_id,
                          const uint8_t* key_id,
                          uint32_t key_id_size) = 0;
 
  protected:
-  CdmProxy() {}
-  virtual ~CdmProxy() {}
+  CdmProxy() = default;
+  virtual ~CdmProxy() = default;
 };
 
 // Responses to CdmProxy calls. All responses will be called asynchronously.
 class CDM_CLASS_API CdmProxyClient {
  public:
   enum Status : uint32_t {
     kOk,
     kFail,
@@ -103,15 +103,15 @@ class CDM_CLASS_API CdmProxyClient {
   virtual void OnMediaCryptoSessionCreated(Status status,
                                            uint32_t crypto_session_id,
                                            uint64_t output_data) = 0;
 
   // Called when there is a hardware reset and all the hardware context is lost.
   virtual void NotifyHardwareReset() = 0;
 
  protected:
-  CdmProxyClient() {}
-  virtual ~CdmProxyClient() {}
+  CdmProxyClient() = default;
+  virtual ~CdmProxyClient() = default;
 };
 
 }  // namespace cdm
 
 #endif  // CDM_CONTENT_DECRYPTION_MODULE_PROXY_H_
--- a/dom/media/gtest/TestCDMStorage.cpp
+++ b/dom/media/gtest/TestCDMStorage.cpp
@@ -115,17 +115,17 @@ class GMPShutdownObserver : public nsIRu
       observerService->RemoveObserver(this, "gmp-shutdown");
       nsCOMPtr<nsIThread> thread(GetGMPThread());
       thread->Dispatch(mContinuation, NS_DISPATCH_NORMAL);
     }
     return NS_OK;
   }
 
  private:
-  virtual ~GMPShutdownObserver() {}
+  virtual ~GMPShutdownObserver() = default;
   nsCOMPtr<nsIRunnable> mShutdownTask;
   nsCOMPtr<nsIRunnable> mContinuation;
   const nsString mNodeId;
 };
 
 NS_IMPL_ISUPPORTS(GMPShutdownObserver, nsIRunnable, nsIObserver)
 
 class NotifyObserversTask : public Runnable {
@@ -177,17 +177,17 @@ class ClearCDMStorageTask : public nsIRu
       EXPECT_TRUE(observerService);
       observerService->RemoveObserver(this, "gmp-clear-storage-complete");
       mTarget->Dispatch(mContinuation, NS_DISPATCH_NORMAL);
     }
     return NS_OK;
   }
 
  private:
-  virtual ~ClearCDMStorageTask() {}
+  virtual ~ClearCDMStorageTask() = default;
   nsCOMPtr<nsIRunnable> mContinuation;
   nsCOMPtr<nsIThread> mTarget;
   const PRTime mSince;
 };
 
 NS_IMPL_ISUPPORTS(ClearCDMStorageTask, nsIRunnable, nsIObserver)
 
 static void ClearCDMStorage(already_AddRefed<nsIRunnable> aContinuation,
@@ -961,17 +961,17 @@ class CDMStorageTest {
   void Terminated() {
     if (mCDM) {
       mCDM->Shutdown();
       mCDM = nullptr;
     }
   }
 
  private:
-  ~CDMStorageTest() {}
+  ~CDMStorageTest() = default;
 
   struct ExpectedMessage {
     ExpectedMessage(const nsCString& aMessage,
                     already_AddRefed<nsIRunnable> aContinuation)
         : mMessage(aMessage), mContinuation(aContinuation) {}
     nsCString mMessage;
     nsCOMPtr<nsIRunnable> mContinuation;
   };
--- a/dom/media/gtest/TestGMPCrossOrigin.cpp
+++ b/dom/media/gtest/TestGMPCrossOrigin.cpp
@@ -16,28 +16,28 @@
 #include "nsThreadUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::gmp;
 
 struct GMPTestRunner {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPTestRunner)
 
-  GMPTestRunner() {}
+  GMPTestRunner() = default;
   void DoTest(void (GMPTestRunner::*aTestMethod)(GMPTestMonitor&));
   void RunTestGMPTestCodec1(GMPTestMonitor& aMonitor);
   void RunTestGMPTestCodec2(GMPTestMonitor& aMonitor);
   void RunTestGMPTestCodec3(GMPTestMonitor& aMonitor);
   void RunTestGMPCrossOrigin1(GMPTestMonitor& aMonitor);
   void RunTestGMPCrossOrigin2(GMPTestMonitor& aMonitor);
   void RunTestGMPCrossOrigin3(GMPTestMonitor& aMonitor);
   void RunTestGMPCrossOrigin4(GMPTestMonitor& aMonitor);
 
  private:
-  ~GMPTestRunner() {}
+  ~GMPTestRunner() = default;
 };
 
 template <class T, class Base,
           nsresult (NS_STDCALL GeckoMediaPluginService::*Getter)(
               GMPCrashHelper*, nsTArray<nsCString>*, const nsACString&,
               UniquePtr<Base>&&)>
 class RunTestGMPVideoCodec : public Base {
  public:
--- a/dom/media/gtest/TestMP3Demuxer.cpp
+++ b/dom/media/gtest/TestMP3Demuxer.cpp
@@ -24,31 +24,31 @@ using media::TimeUnit;
 class MockMP3MediaResource
     : public MockMediaResource,
       public DecoderDoctorLifeLogger<MockMP3MediaResource> {
  public:
   explicit MockMP3MediaResource(const char* aFileName)
       : MockMediaResource(aFileName) {}
 
  protected:
-  virtual ~MockMP3MediaResource() {}
+  virtual ~MockMP3MediaResource() = default;
 };
 
 // MP3 stream mock resource.
 class MockMP3StreamMediaResource
     : public MockMP3MediaResource,
       public DecoderDoctorLifeLogger<MockMP3StreamMediaResource> {
  public:
   explicit MockMP3StreamMediaResource(const char* aFileName)
       : MockMP3MediaResource(aFileName) {}
 
   int64_t GetLength() override { return -1; }
 
  protected:
-  virtual ~MockMP3StreamMediaResource() {}
+  virtual ~MockMP3StreamMediaResource() = default;
 };
 
 struct MP3Resource {
   enum class HeaderType { NONE, XING, VBRI };
   struct Duration {
     int64_t mMicroseconds;
     float mTolerableRate;
 
--- a/dom/media/gtest/TestMP4Demuxer.cpp
+++ b/dom/media/gtest/TestMP4Demuxer.cpp
@@ -138,17 +138,17 @@ class MP4DemuxerBinding {
  private:
   template <typename FunctionType>
   void DispatchTask(FunctionType aFun) {
     RefPtr<Runnable> r =
         NS_NewRunnableFunction("MP4DemuxerBinding::DispatchTask", aFun);
     Unused << mTaskQueue->Dispatch(r.forget());
   }
 
-  virtual ~MP4DemuxerBinding() {}
+  virtual ~MP4DemuxerBinding() = default;
 };
 
 TEST(MP4Demuxer, Seek)
 {
   RefPtr<MP4DemuxerBinding> binding = new MP4DemuxerBinding();
 
   binding->RunTestAndWait([binding]() {
     binding->mVideoTrack =
--- a/dom/media/gtest/TestMediaEventSource.cpp
+++ b/dom/media/gtest/TestMediaEventSource.cpp
@@ -336,17 +336,17 @@ TEST(MediaEventSource, MoveOnly)
 }
 
 struct RefCounter {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RefCounter)
   explicit RefCounter(int aVal) : mVal(aVal) {}
   int mVal;
 
  private:
-  ~RefCounter() {}
+  ~RefCounter() = default;
 };
 
 /*
  * Test we should copy instead of move in NonExclusive mode
  * for each listener must get a copy.
  */
 TEST(MediaEventSource, NoMove)
 {
--- a/dom/media/gtest/mp4_demuxer/TestParser.cpp
+++ b/dom/media/gtest/mp4_demuxer/TestParser.cpp
@@ -57,17 +57,17 @@ class TestStream : public ByteStream,
     return true;
   }
   void DiscardBefore(int64_t aOffset) override {}
 
   // Offset past the last character ever read. 0 when nothing read yet.
   size_t mHighestSuccessfulEndOffset;
 
  protected:
-  virtual ~TestStream() {}
+  virtual ~TestStream() = default;
 
   const uint8_t* mBuffer;
   size_t mSize;
 };
 
 TEST(MP4Metadata, EmptyStream)
 {
   RefPtr<ByteStream> stream = new TestStream(nullptr, 0);
--- a/dom/media/imagecapture/CaptureTask.h
+++ b/dom/media/imagecapture/CaptureTask.h
@@ -58,17 +58,17 @@ class CaptureTask : public DirectMediaTr
   // Remove listeners from MediaStreamTrack and PrincipalChangeObserver.
   // It should be on main thread only.
   void DetachTrack();
 
   // CaptureTask should be created on main thread.
   explicit CaptureTask(dom::ImageCapture* aImageCapture);
 
  protected:
-  virtual ~CaptureTask() {}
+  virtual ~CaptureTask() = default;
 
   // Post a runnable on main thread to end this task and call TaskComplete to
   // post error event to script. It is called off-main-thread.
   void PostTrackEndEvent();
 
   // The ImageCapture associates with this task. This reference count should not
   // change in this class unless it clears this reference after a blob or error
   // event to script.
--- a/dom/media/ipc/RDDProcessImpl.cpp
+++ b/dom/media/ipc/RDDProcessImpl.cpp
@@ -15,17 +15,17 @@
 
 namespace mozilla {
 
 using namespace ipc;
 
 RDDProcessImpl::RDDProcessImpl(ProcessId aParentPid)
     : ProcessChild(aParentPid) {}
 
-RDDProcessImpl::~RDDProcessImpl() {}
+RDDProcessImpl::~RDDProcessImpl() = default;
 
 bool RDDProcessImpl::Init(int aArgc, char* aArgv[]) {
 #if defined(MOZ_SANDBOX) && defined(OS_WIN)
   // Preload AV dlls so we can enable Binary Signature Policy
   // to restrict further dll loads.
   LoadLibraryW(L"mozavcodec.dll");
   LoadLibraryW(L"mozavutil.dll");
   mozilla::SandboxTarget::Instance()->StartSandbox();
--- a/dom/media/ipc/RDDProcessManager.h
+++ b/dom/media/ipc/RDDProcessManager.h
@@ -84,17 +84,17 @@ class RDDProcessManager final : public R
 
   class Observer final : public nsIObserver {
    public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIOBSERVER
     explicit Observer(RDDProcessManager* aManager);
 
    protected:
-    ~Observer() {}
+    ~Observer() = default;
 
     RDDProcessManager* mManager;
   };
   friend class Observer;
 
  private:
   RefPtr<Observer> mObserver;
   mozilla::ipc::TaskFactory<RDDProcessManager> mTaskFactory;
--- a/dom/media/ipc/RemoteDecoderManagerParent.cpp
+++ b/dom/media/ipc/RemoteDecoderManagerParent.cpp
@@ -41,17 +41,17 @@ SurfaceDescriptorGPUVideo RemoteDecoderM
   mTextureMap[ret.handle()] = aTexture;
   return ret;
 }
 
 class RemoteDecoderManagerThreadHolder {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RemoteDecoderManagerThreadHolder)
 
  public:
-  RemoteDecoderManagerThreadHolder() {}
+  RemoteDecoderManagerThreadHolder() = default;
 
  private:
   ~RemoteDecoderManagerThreadHolder() {
     NS_DispatchToMainThread(
         NS_NewRunnableFunction("dom::RemoteDecoderManagerThreadHolder::~"
                                "RemoteDecoderManagerThreadHolder",
                                []() {
                                  sRemoteDecoderManagerParentThread->Shutdown();
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -64,17 +64,17 @@ AudioSink::AudioSink(AbstractThread* aTh
     // We will resample all data to match cubeb's preferred sampling rate.
     mOutputRate = AudioStream::GetPreferredRate();
   }
   MOZ_DIAGNOSTIC_ASSERT(mOutputRate, "output rate can't be 0.");
 
   mOutputChannels = DecideAudioPlaybackChannels(mInfo);
 }
 
-AudioSink::~AudioSink() {}
+AudioSink::~AudioSink() = default;
 
 nsresult AudioSink::Init(const PlaybackParams& aParams,
                          RefPtr<MediaSink::EndedPromise>& aEndedPromise) {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn());
 
   mAudioQueueListener = mAudioQueue.PushEvent().Connect(
       mOwnerThread, this, &AudioSink::OnAudioPushed);
   mAudioQueueFinishListener = mAudioQueue.FinishEvent().Connect(
--- a/dom/media/mediasink/AudioSinkWrapper.cpp
+++ b/dom/media/mediasink/AudioSinkWrapper.cpp
@@ -8,17 +8,17 @@
 #include "AudioSink.h"
 #include "VideoUtils.h"
 #include "nsPrintfCString.h"
 
 namespace mozilla {
 
 using media::TimeUnit;
 
-AudioSinkWrapper::~AudioSinkWrapper() {}
+AudioSinkWrapper::~AudioSinkWrapper() = default;
 
 void AudioSinkWrapper::Shutdown() {
   AssertOwnerThread();
   MOZ_ASSERT(!mIsStarted, "Must be called after playback stopped.");
   mCreator = nullptr;
 }
 
 RefPtr<MediaSink::EndedPromise> AudioSinkWrapper::OnEnded(TrackType aType) {
--- a/dom/media/mediasink/AudioSinkWrapper.h
+++ b/dom/media/mediasink/AudioSinkWrapper.h
@@ -24,17 +24,17 @@ class MediaQueue;
  * A wrapper around AudioSink to provide the interface of MediaSink.
  */
 class AudioSinkWrapper : public MediaSink {
   using PlaybackParams = AudioSink::PlaybackParams;
 
   // An AudioSink factory.
   class Creator {
    public:
-    virtual ~Creator() {}
+    virtual ~Creator() = default;
     virtual AudioSink* Create() = 0;
   };
 
   // Wrap around a function object which creates AudioSinks.
   template <typename Function>
   class CreatorImpl : public Creator {
    public:
     explicit CreatorImpl(const Function& aFunc) : mFunction(aFunc) {}
--- a/dom/media/mediasource/SourceBufferList.cpp
+++ b/dom/media/mediasource/SourceBufferList.cpp
@@ -28,17 +28,17 @@ extern mozilla::LogModule* GetMediaSourc
 
 struct JSContext;
 class JSObject;
 
 namespace mozilla {
 
 namespace dom {
 
-SourceBufferList::~SourceBufferList() {}
+SourceBufferList::~SourceBufferList() = default;
 
 SourceBuffer* SourceBufferList::IndexedGetter(uint32_t aIndex, bool& aFound) {
   MOZ_ASSERT(NS_IsMainThread());
   aFound = aIndex < mSourceBuffers.Length();
 
   if (!aFound) {
     return nullptr;
   }
--- a/dom/media/mediasource/SourceBufferTask.h
+++ b/dom/media/mediasource/SourceBufferTask.h
@@ -39,17 +39,17 @@ class SourceBufferTask {
 
   template <typename ReturnType>
   ReturnType* As() {
     MOZ_ASSERT(this->GetType() == ReturnType::sType);
     return static_cast<ReturnType*>(this);
   }
 
  protected:
-  virtual ~SourceBufferTask() {}
+  virtual ~SourceBufferTask() = default;
 };
 
 class AppendBufferTask : public SourceBufferTask {
  public:
   AppendBufferTask(already_AddRefed<MediaByteBuffer> aData,
                    const SourceBufferAttributes& aAttributes)
       : mBuffer(aData), mAttributes(aAttributes) {}
 
--- a/dom/media/mediasource/TrackBuffersManager.h
+++ b/dom/media/mediasource/TrackBuffersManager.h
@@ -30,17 +30,17 @@ class AbstractThread;
 class ContainerParser;
 class MediaByteBuffer;
 class MediaRawData;
 class MediaSourceDemuxer;
 class SourceBufferResource;
 
 class SourceBufferTaskQueue {
  public:
-  SourceBufferTaskQueue() {}
+  SourceBufferTaskQueue() = default;
 
   ~SourceBufferTaskQueue() {
     MOZ_ASSERT(mQueue.IsEmpty(), "All tasks must have been processed");
   }
 
   void Push(SourceBufferTask* aTask) { mQueue.AppendElement(aTask); }
 
   already_AddRefed<SourceBufferTask> Pop() {
--- a/dom/media/mp3/MP3Demuxer.h
+++ b/dom/media/mp3/MP3Demuxer.h
@@ -75,17 +75,17 @@ class MP3TrackDemuxer : public MediaTrac
   void Reset() override;
   RefPtr<SkipAccessPointPromise> SkipToNextRandomAccessPoint(
       const media::TimeUnit& aTimeThreshold) override;
   int64_t GetResourceOffset() const override;
   media::TimeIntervals GetBuffered() override;
 
  private:
   // Destructor.
-  ~MP3TrackDemuxer() {}
+  ~MP3TrackDemuxer() = default;
 
   // Fast approximate seeking to given time.
   media::TimeUnit FastSeek(const media::TimeUnit& aTime);
 
   // Seeks by scanning the stream up to the given time for more accurate
   // results.
   media::TimeUnit ScanUntil(const media::TimeUnit& aTime);
 
--- a/dom/media/mp3/MP3FrameParser.cpp
+++ b/dom/media/mp3/MP3FrameParser.cpp
@@ -30,17 +30,17 @@ namespace mozilla {
 namespace frame_header {
 // FrameHeader mRaw byte offsets.
 static const int SYNC1 = 0;
 static const int SYNC2_VERSION_LAYER_PROTECTION = 1;
 static const int BITRATE_SAMPLERATE_PADDING_PRIVATE = 2;
 static const int CHANNELMODE_MODEEXT_COPY_ORIG_EMPH = 3;
 }  // namespace frame_header
 
-FrameParser::FrameParser() {}
+FrameParser::FrameParser() = default;
 
 void FrameParser::Reset() {
   mID3Parser.Reset();
   mFrame.Reset();
 }
 
 void FrameParser::ResetFrameData() {
   mFrame.Reset();
--- a/dom/media/mp4/BufferStream.cpp
+++ b/dom/media/mp4/BufferStream.cpp
@@ -10,17 +10,17 @@
 namespace mozilla {
 
 BufferStream::BufferStream()
     : mStartOffset(0), mData(new mozilla::MediaByteBuffer) {}
 
 BufferStream::BufferStream(mozilla::MediaByteBuffer* aBuffer)
     : mStartOffset(0), mData(aBuffer) {}
 
-BufferStream::~BufferStream() {}
+BufferStream::~BufferStream() = default;
 
 /*virtual*/
 bool BufferStream::ReadAt(int64_t aOffset, void* aData, size_t aLength,
                           size_t* aBytesRead) {
   if (aOffset < mStartOffset || aOffset > mStartOffset + mData->Length()) {
     return false;
   }
   *aBytesRead =
--- a/dom/media/mp4/ByteStream.h
+++ b/dom/media/mp4/ByteStream.h
@@ -28,14 +28,14 @@ class ByteStream : public DecoderDoctorL
   // function returns a pointer to the in-memory storage of data at offset.
   // Note that even if a ByteStream stores data in memory, it may not be
   // stored contiguously, in which case this returns nullptr.
   virtual const uint8_t* GetContiguousAccess(int64_t aOffset, size_t aSize) {
     return nullptr;
   }
 
  protected:
-  virtual ~ByteStream() {}
+  virtual ~ByteStream() = default;
 };
 
 }  // namespace mozilla
 
 #endif
--- a/dom/media/mp4/DecoderData.cpp
+++ b/dom/media/mp4/DecoderData.cpp
@@ -31,17 +31,17 @@ mozilla::Result<mozilla::Ok, nsresult> C
     if (!reader.CanReadType<uint32_t>()) {
       return mozilla::Err(NS_ERROR_FAILURE);
     }
     auto length = reader.ReadType<uint32_t>();
 
     if (!reader.ReadArray(psshInfo.data, length)) {
       return mozilla::Err(NS_ERROR_FAILURE);
     }
-    pssh.AppendElement(psshInfo);
+    pssh.AppendElement(std::move(psshInfo));
   }
   return mozilla::Ok();
 }
 
 static MediaResult UpdateTrackProtectedInfo(mozilla::TrackInfo& aConfig,
                                             const Mp4parseSinfInfo& aSinf) {
   if (aSinf.is_encrypted != 0) {
     if (aSinf.scheme_type == MP4_PARSE_ENCRYPTION_SCHEME_TYPE_CENC) {
--- a/dom/media/mp4/DecoderData.h
+++ b/dom/media/mp4/DecoderData.h
@@ -16,32 +16,32 @@
 #include "nsString.h"
 #include "mp4parse.h"
 
 namespace mozilla {
 
 class MP4Demuxer;
 
 struct PsshInfo {
-  PsshInfo() {}
-  PsshInfo(const PsshInfo& aOther) : uuid(aOther.uuid), data(aOther.data) {}
+  PsshInfo() = default;
+  PsshInfo(const PsshInfo& aOther) = delete;
+  PsshInfo(PsshInfo&& aOther) = default;
+
   nsTArray<uint8_t> uuid;
   nsTArray<uint8_t> data;
 
   bool operator==(const PsshInfo& aOther) const {
     return uuid == aOther.uuid && data == aOther.data;
   }
 };
 
 class CryptoFile {
  public:
   CryptoFile() : valid(false) {}
-  CryptoFile(const CryptoFile& aCryptoFile) : valid(aCryptoFile.valid) {
-    pssh.AppendElements(aCryptoFile.pssh);
-  }
+  CryptoFile(const CryptoFile& aCryptoFile) = delete;
 
   void Update(const uint8_t* aData, size_t aLength) {
     valid = DoUpdate(aData, aLength).isOk();
   }
 
   bool valid;
   nsTArray<PsshInfo> pssh;
 
--- a/dom/media/mp4/Index.cpp
+++ b/dom/media/mp4/Index.cpp
@@ -490,17 +490,17 @@ Index::Index(const IndiceWrapper& aIndic
       last.mTime =
           MP4Interval<int64_t>(intervalTime.GetStart(), intervalTime.GetEnd());
     } else {
       mDataOffset.Clear();
     }
   }
 }
 
-Index::~Index() {}
+Index::~Index() = default;
 
 void Index::UpdateMoofIndex(const MediaByteRangeSet& aByteRanges) {
   UpdateMoofIndex(aByteRanges, false);
 }
 
 void Index::UpdateMoofIndex(const MediaByteRangeSet& aByteRanges,
                             bool aCanEvict) {
   if (!mMoofParser) {
--- a/dom/media/mp4/MP4Metadata.cpp
+++ b/dom/media/mp4/MP4Metadata.cpp
@@ -91,17 +91,17 @@ MP4Metadata::MP4Metadata(ByteStream* aSo
     : mSource(aSource), mSourceAdaptor(aSource) {
   DDLINKCHILD("source", aSource);
 
   Mp4parseIo io = {read_source, &mSourceAdaptor};
   mParser.reset(mp4parse_new(&io));
   MOZ_ASSERT(mParser);
 }
 
-MP4Metadata::~MP4Metadata() {}
+MP4Metadata::~MP4Metadata() = default;
 
 nsresult MP4Metadata::Parse() {
   Mp4parseStatus rv = mp4parse_read(mParser.get());
   if (rv != MP4PARSE_STATUS_OK) {
     MOZ_LOG(gMP4MetadataLog, LogLevel::Debug,
             ("Parse failed, return code %d\n", rv));
     return rv == MP4PARSE_STATUS_OOM ? NS_ERROR_OUT_OF_MEMORY
                                      : NS_ERROR_DOM_MEDIA_METADATA_ERR;
--- a/dom/media/mp4/MP4Metadata.h
+++ b/dom/media/mp4/MP4Metadata.h
@@ -37,17 +37,17 @@ struct FreeMP4Parser {
   void operator()(Mp4parseParser* aPtr) { mp4parse_free(aPtr); }
 };
 
 // Wrap an Stream to remember the read offset.
 class StreamAdaptor {
  public:
   explicit StreamAdaptor(ByteStream* aSource) : mSource(aSource), mOffset(0) {}
 
-  ~StreamAdaptor() {}
+  ~StreamAdaptor() = default;
 
   bool Read(uint8_t* buffer, uintptr_t size, size_t* bytes_read);
 
  private:
   ByteStream* mSource;
   CheckedInt<size_t> mOffset;
 };
 
--- a/dom/media/mp4/MoofParser.h
+++ b/dom/media/mp4/MoofParser.h
@@ -197,17 +197,17 @@ class Sbgp final : public Atom  // Sampl
 };
 
 // Stores information form CencSampleEncryptionInformationGroupEntry (seig).
 // Cenc here refers to the common encryption standard, rather than the specific
 // cenc scheme from that standard. This structure is used for all encryption
 // schemes. I.e. it is used for both cenc and cbcs, not just cenc.
 struct CencSampleEncryptionInfoEntry final {
  public:
-  CencSampleEncryptionInfoEntry() {}
+  CencSampleEncryptionInfoEntry() = default;
 
   Result<Ok, nsresult> Init(BoxReader& aReader);
 
   bool mIsEncrypted = false;
   uint8_t mIVSize = 0;
   nsTArray<uint8_t> mKeyId;
   uint8_t mCryptByteBlock = 0;
   uint8_t mSkipByteBlock = 0;
--- a/dom/media/ogg/OggDemuxer.cpp
+++ b/dom/media/ogg/OggDemuxer.cpp
@@ -1188,17 +1188,17 @@ OggDemuxer::PageSyncResult OggDemuxer::P
 OggTrackDemuxer::OggTrackDemuxer(OggDemuxer* aParent,
                                  TrackInfo::TrackType aType,
                                  uint32_t aTrackNumber)
     : mParent(aParent), mType(aType) {
   mInfo = mParent->GetTrackInfo(aType, aTrackNumber);
   MOZ_ASSERT(mInfo);
 }
 
-OggTrackDemuxer::~OggTrackDemuxer() {}
+OggTrackDemuxer::~OggTrackDemuxer() = default;
 
 UniquePtr<TrackInfo> OggTrackDemuxer::GetInfo() const { return mInfo->Clone(); }
 
 RefPtr<OggTrackDemuxer::SeekPromise> OggTrackDemuxer::Seek(
     const TimeUnit& aTime) {
   // Seeks to aTime. Upon success, SeekPromise will be resolved with the
   // actual time seeked to. Typically the random access point time
   mQueuedSample = nullptr;
--- a/dom/media/platforms/PDMFactory.cpp
+++ b/dom/media/platforms/PDMFactory.cpp
@@ -150,17 +150,17 @@ class SupportChecker {
 };  // SupportChecker
 
 PDMFactory::PDMFactory() {
   EnsureInit();
   CreatePDMs();
   CreateNullPDM();
 }
 
-PDMFactory::~PDMFactory() {}
+PDMFactory::~PDMFactory() = default;
 
 /* static */
 void PDMFactory::EnsureInit() {
   {
     StaticMutexAutoLock mon(sMonitor);
     if (sInstance) {
       // Quick exit if we already have an instance.
       return;
--- a/dom/media/platforms/PEMFactory.h
+++ b/dom/media/platforms/PEMFactory.h
@@ -22,17 +22,17 @@ class PEMFactory final {
   // instance. It's expected that there will be multiple
   // PlatformEncoderModules alive at the same time.
   already_AddRefed<MediaDataEncoder> CreateEncoder(
       const CreateEncoderParams& aParams);
 
   bool SupportsMimeType(const nsACString& aMimeType) const;
 
  private:
-  virtual ~PEMFactory() {}
+  virtual ~PEMFactory() = default;
   // Returns the first PEM in our list supporting the mimetype.
   already_AddRefed<PlatformEncoderModule> FindPEM(
       const TrackInfo& aTrackInfo) const;
 
   nsTArray<RefPtr<PlatformEncoderModule>> mModules;
 };
 
 }  // namespace mozilla
--- a/dom/media/platforms/PlatformDecoderModule.h
+++ b/dom/media/platforms/PlatformDecoderModule.h
@@ -191,18 +191,18 @@ class PlatformDecoderModule {
       return false;
     }
     const auto videoInfo = aTrackInfo.GetAsVideoInfo();
     return !videoInfo ||
            SupportsColorDepth(videoInfo->mColorDepth, aDiagnostics);
   }
 
  protected:
-  PlatformDecoderModule() {}
-  virtual ~PlatformDecoderModule() {}
+  PlatformDecoderModule() = default;
+  virtual ~PlatformDecoderModule() = default;
 
   friend class MediaChangeMonitor;
   friend class PDMFactory;
   friend class GpuDecoderModule;
   friend class EMEDecoderModule;
   friend class RemoteDecoderModule;
 
   // Indicates if the PlatformDecoderModule supports decoding of aColorDepth.
@@ -255,17 +255,17 @@ DDLoggedTypeDeclName(MediaDataDecoder);
 // should (like in Flush()).
 //
 // Decoding is done asynchronously. Any async work can be done on the
 // TaskQueue passed into the PlatformDecoderModules's Create*Decoder()
 // function. This may not be necessary for platforms with async APIs
 // for decoding.
 class MediaDataDecoder : public DecoderDoctorLifeLogger<MediaDataDecoder> {
  protected:
-  virtual ~MediaDataDecoder() {}
+  virtual ~MediaDataDecoder() = default;
 
  public:
   typedef TrackInfo::TrackType TrackType;
   typedef nsTArray<RefPtr<MediaData>> DecodedData;
   typedef MozPromise<TrackType, MediaResult, /* IsExclusive = */ true>
       InitPromise;
   typedef MozPromise<DecodedData, MediaResult, /* IsExclusive = */ true>
       DecodePromise;
--- a/dom/media/platforms/PlatformEncoderModule.h
+++ b/dom/media/platforms/PlatformEncoderModule.h
@@ -37,17 +37,18 @@ class PlatformEncoderModule {
     return nullptr;
   };
 
   // Indicates if the PlatformDecoderModule supports encoding of aMimeType.
   virtual bool SupportsMimeType(const nsACString& aMimeType) const = 0;
 
  protected:
   PlatformEncoderModule() = default;
-  virtual ~PlatformEncoderModule(){};
+  virtual ~PlatformEncoderModule() = default;
+  ;
 };
 
 class MediaDataEncoder {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaDataEncoder)
 
   enum class Usage {
     Realtime,  // For WebRTC
@@ -166,17 +167,17 @@ class MediaDataEncoder {
       mCodecSpecific.emplace(aCodecSpecific);
     }
 
    protected:
     BaseConfig(const CodecType aCodecType, const Usage aUsage,
                const Rate aBitsPerSec)
         : mCodecType(aCodecType), mUsage(aUsage), mBitsPerSec(aBitsPerSec) {}
 
-    virtual ~BaseConfig() {}
+    virtual ~BaseConfig() = default;
   };
 
   template <typename T>
   struct VideoConfig final : public BaseConfig<T> {
     const gfx::IntSize mSize;
     const PixelFormat mSourcePixelFormat;
     const uint8_t mFramerate;
     VideoConfig(const CodecType aCodecType, const Usage aUsage,
@@ -196,17 +197,17 @@ class MediaDataEncoder {
     AudioConfig(const CodecType aCodecType, const Usage aUsage,
                 const Rate aBitrate, const Rate aSampleRate,
                 const uint8_t aNumChannels)
         : BaseConfig<T>(aCodecType, aUsage, aBitrate),
           mNumChannels(aNumChannels),
           mSampleRate(aSampleRate) {}
   };
 
-  virtual ~MediaDataEncoder() {}
+  virtual ~MediaDataEncoder() = default;
 
  public:
   using H264Config = VideoConfig<H264Specific>;
 };
 
 struct MOZ_STACK_CLASS CreateEncoderParams final {
   union CodecSpecific {
     MediaDataEncoder::H264Specific mH264;
--- a/dom/media/platforms/agnostic/AOMDecoder.cpp
+++ b/dom/media/platforms/agnostic/AOMDecoder.cpp
@@ -77,17 +77,17 @@ static MediaResult InitContext(AOMDecode
 
 AOMDecoder::AOMDecoder(const CreateDecoderParams& aParams)
     : mImageContainer(aParams.mImageContainer),
       mTaskQueue(aParams.mTaskQueue),
       mInfo(aParams.VideoConfig()) {
   PodZero(&mCodec);
 }
 
-AOMDecoder::~AOMDecoder() {}
+AOMDecoder::~AOMDecoder() = default;
 
 RefPtr<ShutdownPromise> AOMDecoder::Shutdown() {
   RefPtr<AOMDecoder> self = this;
   return InvokeAsync(mTaskQueue, __func__, [self]() {
     auto res = aom_codec_destroy(&self->mCodec);
     if (res != AOM_CODEC_OK) {
       LOGEX_RESULT(self.get(), res, "aom_codec_destroy");
     }
--- a/dom/media/platforms/agnostic/DummyMediaDataDecoder.cpp
+++ b/dom/media/platforms/agnostic/DummyMediaDataDecoder.cpp
@@ -6,17 +6,17 @@
 
 #include "DummyMediaDataDecoder.h"
 #include "AnnexB.h"
 #include "H264.h"
 #include "MP4Decoder.h"
 
 namespace mozilla {
 
-DummyDataCreator::~DummyDataCreator() {}
+DummyDataCreator::~DummyDataCreator() = default;
 
 DummyMediaDataDecoder::DummyMediaDataDecoder(
     UniquePtr<DummyDataCreator>&& aCreator, const nsACString& aDescription,
     const CreateDecoderParams& aParams)
     : mCreator(std::move(aCreator)),
       mIsH264(MP4Decoder::IsH264(aParams.mConfig.mMimeType)),
       mMaxRefFrames(mIsH264 ? H264::HasSPS(aParams.VideoConfig().mExtraData)
                                   ? H264::ComputeMaxRefFrames(
--- a/dom/media/platforms/agnostic/NullDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/NullDecoderModule.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DummyMediaDataDecoder.h"
 
 namespace mozilla {
 
 class NullVideoDataCreator : public DummyDataCreator {
  public:
-  NullVideoDataCreator() {}
+  NullVideoDataCreator() = default;
 
   already_AddRefed<MediaData> Create(MediaRawData* aSample) override {
     // Create a dummy VideoData with no image. This gives us something to
     // send to media streams if necessary.
     RefPtr<VideoData> v(new VideoData(aSample->mOffset, aSample->mTime,
                                       aSample->mDuration, aSample->mKeyframe,
                                       aSample->mTimecode, gfx::IntSize(), 0));
     return v.forget();
--- a/dom/media/platforms/agnostic/bytestreams/H264.cpp
+++ b/dom/media/platforms/agnostic/bytestreams/H264.cpp
@@ -329,17 +329,17 @@ class SPSNAL {
       return;
     }
     mDecodedNAL = H264::DecodeNALUnit(aPtr, aLength);
     if (mDecodedNAL) {
       mLength = BitReader::GetBitLength(mDecodedNAL);
     }
   }
 
-  SPSNAL() {}
+  SPSNAL() = default;
 
   bool IsValid() const { return mDecodedNAL; }
 
   bool operator==(const SPSNAL& aOther) const {
     if (!mDecodedNAL || !aOther.mDecodedNAL) {
       return false;
     }
 
--- a/dom/media/platforms/agnostic/eme/ChromiumCDMVideoDecoder.cpp
+++ b/dom/media/platforms/agnostic/eme/ChromiumCDMVideoDecoder.cpp
@@ -17,17 +17,17 @@ namespace mozilla {
 ChromiumCDMVideoDecoder::ChromiumCDMVideoDecoder(
     const GMPVideoDecoderParams& aParams, CDMProxy* aCDMProxy)
     : mCDMParent(aCDMProxy->AsChromiumCDMProxy()->GetCDMParent()),
       mConfig(aParams.mConfig),
       mCrashHelper(aParams.mCrashHelper),
       mGMPThread(GetGMPAbstractThread()),
       mImageContainer(aParams.mImageContainer) {}
 
-ChromiumCDMVideoDecoder::~ChromiumCDMVideoDecoder() {}
+ChromiumCDMVideoDecoder::~ChromiumCDMVideoDecoder() = default;
 
 static uint32_t ToCDMH264Profile(uint8_t aProfile) {
   switch (aProfile) {
     case 66:
       return cdm::VideoCodecProfile::kH264ProfileBaseline;
     case 77:
       return cdm::VideoCodecProfile::kH264ProfileMain;
     case 88:
--- a/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp
@@ -354,17 +354,17 @@ RefPtr<ShutdownPromise> EMEMediaDataDeco
     mProxy = nullptr;
     return MediaDataDecoderProxy::Shutdown();
   });
 }
 
 EMEDecoderModule::EMEDecoderModule(CDMProxy* aProxy, PDMFactory* aPDM)
     : mProxy(aProxy), mPDM(aPDM) {}
 
-EMEDecoderModule::~EMEDecoderModule() {}
+EMEDecoderModule::~EMEDecoderModule() = default;
 
 static already_AddRefed<MediaDataDecoderProxy> CreateDecoderWrapper(
     CDMProxy* aProxy, const CreateDecoderParams& aParams) {
   RefPtr<gmp::GeckoMediaPluginService> s(
       gmp::GeckoMediaPluginService::GetGeckoMediaPluginService());
   if (!s) {
     return nullptr;
   }
--- a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
@@ -17,19 +17,19 @@
 #include "mozilla/StaticMutex.h"
 #include "nsServiceManagerUtils.h"
 #ifdef XP_WIN
 #  include "WMFDecoderModule.h"
 #endif
 
 namespace mozilla {
 
-GMPDecoderModule::GMPDecoderModule() {}
+GMPDecoderModule::GMPDecoderModule() = default;
 
-GMPDecoderModule::~GMPDecoderModule() {}
+GMPDecoderModule::~GMPDecoderModule() = default;
 
 static already_AddRefed<MediaDataDecoderProxy> CreateDecoderWrapper() {
   RefPtr<gmp::GeckoMediaPluginService> s(
       gmp::GeckoMediaPluginService::GetGeckoMediaPluginService());
   if (!s) {
     return nullptr;
   }
   RefPtr<AbstractThread> thread(s->GetAbstractGMPThread());
--- a/dom/media/platforms/ffmpeg/FFmpegDecoderModule.h
+++ b/dom/media/platforms/ffmpeg/FFmpegDecoderModule.h
@@ -22,17 +22,17 @@ class FFmpegDecoderModule : public Platf
   static already_AddRefed<PlatformDecoderModule> Create(
       FFmpegLibWrapper* aLib) {
     RefPtr<PlatformDecoderModule> pdm = new FFmpegDecoderModule(aLib);
 
     return pdm.forget();
   }
 
   explicit FFmpegDecoderModule(FFmpegLibWrapper* aLib) : mLib(aLib) {}
-  virtual ~FFmpegDecoderModule() {}
+  virtual ~FFmpegDecoderModule() = default;
 
   already_AddRefed<MediaDataDecoder> CreateVideoDecoder(
       const CreateDecoderParams& aParams) override {
     // Temporary - forces use of VPXDecoder when alpha is present.
     // Bug 1263836 will handle alpha scenario once implemented. It will shift
     // the check for alpha to PDMFactory but not itself remove the need for a
     // check.
     if (aParams.VideoConfig().HasAlpha()) {
--- a/dom/media/platforms/omx/OmxDataDecoder.cpp
+++ b/dom/media/platforms/omx/OmxDataDecoder.cpp
@@ -58,17 +58,17 @@ static const char* StateTypeToStr(OMX_ST
     default:
       return "Unknown";
   }
 }
 
 // A helper class to retrieve AudioData or VideoData.
 class MediaDataHelper {
  protected:
-  virtual ~MediaDataHelper() {}
+  virtual ~MediaDataHelper() = default;
 
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaDataHelper)
 
   MediaDataHelper(const TrackInfo* aTrackInfo,
                   layers::ImageContainer* aImageContainer,
                   OmxPromiseLayer* aOmxLayer);
 
--- a/dom/media/platforms/omx/OmxPlatformLayer.cpp
+++ b/dom/media/platforms/omx/OmxPlatformLayer.cpp
@@ -31,17 +31,17 @@
 // Common OMX decoder configuration code.
 namespace mozilla {
 
 // This helper class encapsulates the details of component parameters setting
 // for different OMX audio & video codecs.
 template <typename ParamType>
 class OmxConfig {
  public:
-  virtual ~OmxConfig() {}
+  virtual ~OmxConfig() = default;
   // Subclasses should implement this method to configure the codec.
   virtual OMX_ERRORTYPE Apply(OmxPlatformLayer& aOmx,
                               const ParamType& aParam) = 0;
 };
 
 typedef OmxConfig<AudioInfo> OmxAudioConfig;
 typedef OmxConfig<VideoInfo> OmxVideoConfig;
 
--- a/dom/media/platforms/omx/OmxPlatformLayer.h
+++ b/dom/media/platforms/omx/OmxPlatformLayer.h
@@ -58,17 +58,17 @@ class OmxPlatformLayer {
                                      OMX_U32 aComponentParameterSize) = 0;
 
   virtual OMX_ERRORTYPE SetParameter(OMX_INDEXTYPE nIndex,
                                      OMX_PTR aComponentParameterStructure,
                                      OMX_U32 aComponentParameterSize) = 0;
 
   virtual nsresult Shutdown() = 0;
 
-  virtual ~OmxPlatformLayer() {}
+  virtual ~OmxPlatformLayer() = default;
 
   // For decoders, input port index is start port number and output port is
   // next. See OpenMAX IL spec v1.1.2 section 8.6.1 & 8.8.1.
   OMX_U32 InputPortIndex() { return mStartPortNumber; }
 
   OMX_U32 OutputPortIndex() { return mStartPortNumber + 1; }
 
   void GetPortIndices(nsTArray<uint32_t>& aPortIndex) {
--- a/dom/media/platforms/omx/OmxPromiseLayer.h
+++ b/dom/media/platforms/omx/OmxPromiseLayer.h
@@ -35,17 +35,17 @@ class TrackInfo;
  *    Because omx buffer works crossing threads, so each omx buffer has its own
  *    promise, it is defined in BufferData.
  *
  * All of functions and members in this class should be run in the same
  * TaskQueue.
  */
 class OmxPromiseLayer {
  protected:
-  virtual ~OmxPromiseLayer() {}
+  virtual ~OmxPromiseLayer() = default;
 
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(OmxPromiseLayer)
 
   OmxPromiseLayer(TaskQueue* aTaskQueue, OmxDataDecoder* aDataDecoder,
                   layers::ImageContainer* aImageContainer);
 
   class BufferData;
@@ -114,17 +114,17 @@ class OmxPromiseLayer {
 
   nsresult Shutdown();
 
   // BufferData maintains the status of OMX buffer (OMX_BUFFERHEADERTYPE).
   // mStatus tracks the buffer owner.
   // And a promise because OMX buffer working among different threads.
   class BufferData {
    protected:
-    virtual ~BufferData() {}
+    virtual ~BufferData() = default;
 
    public:
     explicit BufferData(OMX_BUFFERHEADERTYPE* aBuffer)
         : mEos(false), mStatus(BufferStatus::FREE), mBuffer(aBuffer) {}
 
     typedef void* BufferID;
 
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BufferData)
--- a/dom/media/platforms/wrappers/MediaChangeMonitor.cpp
+++ b/dom/media/platforms/wrappers/MediaChangeMonitor.cpp
@@ -252,17 +252,17 @@ MediaChangeMonitor::MediaChangeMonitor(P
     mChangeMonitor = MakeUnique<H264ChangeMonitor>(
         mCurrentConfig,
         mDecoderOptions.contains(CreateDecoderParams::Option::FullH264Parsing));
   }
   mLastError = CreateDecoder(aParams.mDiagnostics);
   mInConstructor = false;
 }
 
-MediaChangeMonitor::~MediaChangeMonitor() {}
+MediaChangeMonitor::~MediaChangeMonitor() = default;
 
 RefPtr<MediaDataDecoder::InitPromise> MediaChangeMonitor::Init() {
   RefPtr<MediaChangeMonitor> self = this;
   return InvokeAsync(
       mTaskQueue, __func__, [self, this]() -> RefPtr<InitPromise> {
         if (mDecoder) {
           RefPtr<InitPromise> p = mInitPromise.Ensure(__func__);
           mDecoder->Init()
--- a/dom/media/systemservices/CamerasParent.h
+++ b/dom/media/systemservices/CamerasParent.h
@@ -55,17 +55,17 @@ class InputObserver : public webrtc::Vid
 
   explicit InputObserver(CamerasParent* aParent) : mParent(aParent){};
 
   virtual void OnDeviceChange() override;
 
   friend CamerasParent;
 
  private:
-  ~InputObserver() {}
+  ~InputObserver() = default;
 
   RefPtr<CamerasParent> mParent;
 };
 
 class CamerasParent final : public PCamerasParent,
                             public nsIAsyncShutdownBlocker {
   NS_DECL_THREADSAFE_ISUPPORTS
 
--- a/dom/media/systemservices/MediaParent.cpp
+++ b/dom/media/systemservices/MediaParent.cpp
@@ -152,17 +152,17 @@ class OriginKeyStore : public nsISupport
 
    protected:
     nsClassHashtable<nsCStringHashKey, OriginKey> mKeys;
     size_t mPersistCount;
   };
 
   class OriginKeysLoader : public OriginKeysTable {
    public:
-    OriginKeysLoader() {}
+    OriginKeysLoader() = default;
 
     nsresult GetPrincipalKey(const ipc::PrincipalInfo& aPrincipalInfo,
                              nsCString& aResult, bool aPersist = false) {
       auto before = mPersistCount;
       nsresult rv =
           OriginKeysTable::GetPrincipalKey(aPrincipalInfo, aResult, aPersist);
       if (NS_WARN_IF(NS_FAILED(rv))) {
         return rv;
--- a/dom/media/systemservices/MediaParent.h
+++ b/dom/media/systemservices/MediaParent.h
@@ -18,17 +18,17 @@ namespace media {
 // A same-process version may also be created to service non-e10s calls.
 
 class OriginKeyStore;
 
 class NonE10s {
   typedef mozilla::ipc::IProtocol::ActorDestroyReason ActorDestroyReason;
 
  public:
-  virtual ~NonE10s() {}
+  virtual ~NonE10s() = default;
 
  protected:
   virtual mozilla::ipc::IPCResult RecvGetPrincipalKey(
       const mozilla::ipc::PrincipalInfo& aPrincipalInfo, const bool& aPersist,
       PMediaParent::GetPrincipalKeyResolver&& aResolve) = 0;
   virtual mozilla::ipc::IPCResult RecvSanitizeOriginKeys(
       const uint64_t& aSinceWhen, const bool& aOnlyPrivateBrowsing) = 0;
   virtual void ActorDestroy(ActorDestroyReason aWhy) = 0;
@@ -38,17 +38,17 @@ class NonE10s {
  * Dummy class to avoid a templated class being passed to the refcounting macro
  * (see Bug 1334421 for what happens then)
  */
 class RefCountedParent {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RefCountedParent)
 
  protected:
-  virtual ~RefCountedParent() {}
+  virtual ~RefCountedParent() = default;
 };
 
 // Super = PMediaParent or NonE10s
 
 template <class Super>
 class Parent : public RefCountedParent, public Super {
   typedef mozilla::ipc::IProtocol::ActorDestroyReason ActorDestroyReason;
 
--- a/dom/media/systemservices/MediaSystemResourceManagerChild.cpp
+++ b/dom/media/systemservices/MediaSystemResourceManagerChild.cpp
@@ -8,17 +8,17 @@
 #include "MediaSystemResourceManagerChild.h"
 
 namespace mozilla {
 namespace media {
 
 MediaSystemResourceManagerChild::MediaSystemResourceManagerChild()
     : mDestroyed(false), mManager(nullptr) {}
 
-MediaSystemResourceManagerChild::~MediaSystemResourceManagerChild() {}
+MediaSystemResourceManagerChild::~MediaSystemResourceManagerChild() = default;
 
 mozilla::ipc::IPCResult MediaSystemResourceManagerChild::RecvResponse(
     const uint32_t& aId, const bool& aSuccess) {
   if (mManager) {
     mManager->RecvResponse(aId, aSuccess);
   }
   return IPC_OK();
 }
--- a/dom/media/systemservices/MediaSystemResourceService.cpp
+++ b/dom/media/systemservices/MediaSystemResourceService.cpp
@@ -40,17 +40,17 @@ void MediaSystemResourceService::Shutdow
     sSingleton = nullptr;
   }
 }
 
 MediaSystemResourceService::MediaSystemResourceService() : mDestroyed(false) {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
 }
 
-MediaSystemResourceService::~MediaSystemResourceService() {}
+MediaSystemResourceService::~MediaSystemResourceService() = default;
 
 void MediaSystemResourceService::Destroy() { mDestroyed = true; }
 
 void MediaSystemResourceService::Acquire(
     media::MediaSystemResourceManagerParent* aParent, uint32_t aId,
     MediaSystemResourceType aResourceType, bool aWillWait) {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
   MOZ_ASSERT(aParent);
--- a/dom/media/systemservices/MediaUtils.h
+++ b/dom/media/systemservices/MediaUtils.h
@@ -97,17 +97,17 @@ already_AddRefed<LambdaRunnable<OnRunTyp
  * Technical limitation: A template specialization is needed for types that take
  * a constructor. Please add below (UniquePtr covers a lot of ground though).
  */
 
 class RefcountableBase {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(RefcountableBase)
  protected:
-  virtual ~RefcountableBase() {}
+  virtual ~RefcountableBase() = default;
 };
 
 template <typename T>
 class Refcountable : public T, public RefcountableBase {
  public:
   NS_METHOD_(MozExternalRefCountType) AddRef() {
     return RefcountableBase::AddRef();
   }
@@ -122,26 +122,26 @@ class Refcountable : public T, public Re
   }
 
   Refcountable<T>& operator=(T& aOther) {
     T::operator=(aOther);
     return *this;
   }
 
  private:
-  ~Refcountable<T>() {}
+  ~Refcountable<T>() = default;
 };
 
 template <typename T>
 class Refcountable<UniquePtr<T>> : public UniquePtr<T> {
  public:
   explicit Refcountable<UniquePtr<T>>(T* aPtr) : UniquePtr<T>(aPtr) {}
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Refcountable<T>)
  private:
-  ~Refcountable<UniquePtr<T>>() {}
+  ~Refcountable<UniquePtr<T>>() = default;
 };
 
 /* Async shutdown helpers
  */
 
 RefPtr<nsIAsyncShutdownClient> GetShutdownBarrier();
 
 class ShutdownBlocker : public nsIAsyncShutdownBlocker {
@@ -155,17 +155,17 @@ class ShutdownBlocker : public nsIAsyncS
     aName = mName;
     return NS_OK;
   }
 
   NS_IMETHOD GetState(nsIPropertyBag**) override { return NS_OK; }
 
   NS_DECL_ISUPPORTS
  protected:
-  virtual ~ShutdownBlocker() {}
+  virtual ~ShutdownBlocker() = default;
 
  private:
   const nsString mName;
 };
 
 class ShutdownTicket final {
  public:
   explicit ShutdownTicket(nsIAsyncShutdownBlocker* aBlocker)
--- a/dom/media/systemservices/VideoEngine.h
+++ b/dom/media/systemservices/VideoEngine.h
@@ -18,17 +18,18 @@
 
 namespace mozilla {
 namespace camera {
 
 // Historically the video engine was part of webrtc
 // it was removed (and reimplemented in Talk)
 class VideoEngine {
  private:
-  virtual ~VideoEngine(){};
+  virtual ~VideoEngine() = default;
+
   // Base cache expiration period
   // Note because cameras use HW plug event detection, this
   // only applies to screen based modes.
   static const int64_t kCacheExpiryPeriodMs = 2000;
 
  public:
   VideoEngine() : mId(0){};
   NS_INLINE_DECL_REFCOUNTING(VideoEngine)
--- a/dom/media/wave/WaveDemuxer.cpp
+++ b/dom/media/wave/WaveDemuxer.cpp
@@ -716,17 +716,17 @@ bool FormatParser::FormatChunk::IsValid(
 void FormatParser::FormatChunk::Update(uint8_t c) {
   if (mPos < FMT_CHUNK_MIN_SIZE) {
     mRaw[mPos++] = c;
   }
 }
 
 // DataParser
 
-DataParser::DataParser() {}
+DataParser::DataParser() = default;
 
 void DataParser::Reset() { mChunk.Reset(); }
 
 const DataParser::DataChunk& DataParser::CurrentChunk() const { return mChunk; }
 
 // DataParser::DataChunk
 
 void DataParser::DataChunk::Reset() { mPos = 0; }
--- a/dom/media/wave/WaveDemuxer.h
+++ b/dom/media/wave/WaveDemuxer.h
@@ -199,17 +199,17 @@ class WAVTrackDemuxer : public MediaTrac
   RefPtr<SamplesPromise> GetSamples(int32_t aNumSamples) override;
   void Reset() override;
   RefPtr<SkipAccessPointPromise> SkipToNextRandomAccessPoint(
       const media::TimeUnit& aTimeThreshold) override;
   int64_t GetResourceOffset() const override;
   media::TimeIntervals GetBuffered() override;
 
  private:
-  ~WAVTrackDemuxer() {}
+  ~WAVTrackDemuxer() = default;
 
   media::TimeUnit FastSeek(const media::TimeUnit& aTime);
   media::TimeUnit ScanUntil(const media::TimeUnit& aTime);
 
   MediaByteRange FindNextChunk();
 
   MediaByteRange FindChunkHeader();
   MediaByteRange FindRIFFHeader();
--- a/dom/media/webaudio/AlignedTArray.h
+++ b/dom/media/webaudio/AlignedTArray.h
@@ -20,17 +20,17 @@ class AlignedAutoTArray : private AutoTA
   static_assert((N & (N - 1)) == 0, "N must be power of 2");
   typedef AutoTArray<E, S + N> base_type;
 
  public:
   typedef E elem_type;
   typedef typename base_type::size_type size_type;
   typedef typename base_type::index_type index_type;
 
-  AlignedAutoTArray() {}
+  AlignedAutoTArray() = default;
   explicit AlignedAutoTArray(size_type capacity)
       : base_type(capacity + sExtra) {}
   elem_type* Elements() { return getAligned(base_type::Elements()); }
   const elem_type* Elements() const {
     return getAligned(base_type::Elements());
   }
   elem_type& operator[](index_type i) { return Elements()[i]; }
   const elem_type& operator[](index_type i) const { return Elements()[i]; }
@@ -72,17 +72,17 @@ class AlignedTArray : private nsTArray_I
   static_assert((N & (N - 1)) == 0, "N must be power of 2");
   typedef nsTArray_Impl<E, nsTArrayInfallibleAllocator> base_type;
 
  public:
   typedef E elem_type;
   typedef typename base_type::size_type size_type;
   typedef typename base_type::index_type index_type;
 
-  AlignedTArray() {}
+  AlignedTArray() = default;
   explicit AlignedTArray(size_type capacity) : base_type(capacity + sExtra) {}
   elem_type* Elements() { return getAligned(base_type::Elements()); }
   const elem_type* Elements() const {
     return getAligned(base_type::Elements());
   }
   elem_type& operator[](index_type i) { return Elements()[i]; }
   const elem_type& operator[](index_type i) const { return Elements()[i]; }
 
--- a/dom/media/webaudio/AudioBuffer.cpp
+++ b/dom/media/webaudio/AudioBuffer.cpp
@@ -83,17 +83,17 @@ AudioBufferMemoryTracker* AudioBufferMem
   sMutex.AssertCurrentThreadOwns();
   if (!sSingleton) {
     sSingleton = new AudioBufferMemoryTracker();
     sSingleton->Init();
   }
   return sSingleton;
 }
 
-AudioBufferMemoryTracker::AudioBufferMemoryTracker() {}
+AudioBufferMemoryTracker::AudioBufferMemoryTracker() = default;
 
 void AudioBufferMemoryTracker::Init() { RegisterWeakMemoryReporter(this); }
 
 AudioBufferMemoryTracker::~AudioBufferMemoryTracker() {
   UnregisterWeakMemoryReporter(this);
 }
 
 void AudioBufferMemoryTracker::RegisterAudioBuffer(
--- a/dom/media/webaudio/AudioContext.cpp
+++ b/dom/media/webaudio/AudioContext.cpp
@@ -1311,17 +1311,17 @@ void AudioContext::ReportToConsole(uint3
   nsContentUtils::ReportToConsole(aErrorFlags, NS_LITERAL_CSTRING("Media"), doc,
                                   nsContentUtils::eDOM_PROPERTIES, aMsg);
 }
 
 BasicWaveFormCache::BasicWaveFormCache(uint32_t aSampleRate)
     : mSampleRate(aSampleRate) {
   MOZ_ASSERT(NS_IsMainThread());
 }
-BasicWaveFormCache::~BasicWaveFormCache() {}
+BasicWaveFormCache::~BasicWaveFormCache() = default;
 
 WebCore::PeriodicWave* BasicWaveFormCache::GetBasicWaveForm(
     OscillatorType aType) {
   MOZ_ASSERT(!NS_IsMainThread());
   if (aType == OscillatorType::Sawtooth) {
     if (!mSawtooth) {
       mSawtooth = WebCore::PeriodicWave::createSawtooth(mSampleRate);
     }
--- a/dom/media/webaudio/AudioDestinationNode.cpp
+++ b/dom/media/webaudio/AudioDestinationNode.cpp
@@ -342,17 +342,17 @@ AudioDestinationNode::AudioDestinationNo
         },
         [] {
           NS_WARNING(
               "AudioDestinationNode's graph never started processing audio");
         });
   }
 }
 
-AudioDestinationNode::~AudioDestinationNode() {}
+AudioDestinationNode::~AudioDestinationNode() = default;
 
 size_t AudioDestinationNode::SizeOfExcludingThis(
     MallocSizeOf aMallocSizeOf) const {
   size_t amount = AudioNode::SizeOfExcludingThis(aMallocSizeOf);
   // Might be useful in the future:
   // - mAudioChannelAgent
   return amount;
 }
--- a/dom/media/webaudio/AudioProcessingEvent.cpp
+++ b/dom/media/webaudio/AudioProcessingEvent.cpp
@@ -21,17 +21,17 @@ NS_INTERFACE_MAP_END_INHERITING(Event)
 NS_IMPL_ADDREF_INHERITED(AudioProcessingEvent, Event)
 NS_IMPL_RELEASE_INHERITED(AudioProcessingEvent, Event)
 
 AudioProcessingEvent::AudioProcessingEvent(ScriptProcessorNode* aOwner,
                                            nsPresContext* aPresContext,
                                            WidgetEvent* aEvent)
     : Event(aOwner, aPresContext, aEvent), mPlaybackTime(0.0), mNode(aOwner) {}
 
-AudioProcessingEvent::~AudioProcessingEvent() {}
+AudioProcessingEvent::~AudioProcessingEvent() = default;
 
 JSObject* AudioProcessingEvent::WrapObjectInternal(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return AudioProcessingEvent_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 already_AddRefed<AudioBuffer> AudioProcessingEvent::LazilyCreateBuffer(
     uint32_t aNumberOfChannels, ErrorResult& aRv) {
--- a/dom/media/webaudio/ConstantSourceNode.cpp
+++ b/dom/media/webaudio/ConstantSourceNode.cpp
@@ -161,17 +161,17 @@ ConstantSourceNode::ConstantSourceNode(A
       new ConstantSourceNodeEngine(this, aContext->Destination());
   mTrack = AudioNodeTrack::Create(aContext, engine,
                                   AudioNodeTrack::NEED_MAIN_THREAD_ENDED,
                                   aContext->Graph());
   engine->SetSourceTrack(mTrack);
   mTrack->AddMainThreadListener(this);
 }
 
-ConstantSourceNode::~ConstantSourceNode() {}
+ConstantSourceNode::~ConstantSourceNode() = default;
 
 size_t ConstantSourceNode::SizeOfExcludingThis(
     MallocSizeOf aMallocSizeOf) const {
   size_t amount = AudioNode::SizeOfExcludingThis(aMallocSizeOf);
 
   amount += mOffset->SizeOfIncludingThis(aMallocSizeOf);
   return amount;
 }
--- a/dom/media/webaudio/ScriptProcessorNode.cpp
+++ b/dom/media/webaudio/ScriptProcessorNode.cpp
@@ -479,17 +479,17 @@ ScriptProcessorNode::ScriptProcessorNode
       mNumberOfOutputChannels(aNumberOfOutputChannels) {
   MOZ_ASSERT(BufferSize() % WEBAUDIO_BLOCK_SIZE == 0, "Invalid buffer size");
   ScriptProcessorNodeEngine* engine = new ScriptProcessorNodeEngine(
       this, aContext->Destination(), BufferSize(), aNumberOfInputChannels);
   mTrack = AudioNodeTrack::Create(
       aContext, engine, AudioNodeTrack::NO_TRACK_FLAGS, aContext->Graph());
 }
 
-ScriptProcessorNode::~ScriptProcessorNode() {}
+ScriptProcessorNode::~ScriptProcessorNode() = default;
 
 size_t ScriptProcessorNode::SizeOfExcludingThis(
     MallocSizeOf aMallocSizeOf) const {
   size_t amount = AudioNode::SizeOfExcludingThis(aMallocSizeOf);
   return amount;
 }
 
 size_t ScriptProcessorNode::SizeOfIncludingThis(
--- a/dom/media/webaudio/blink/Biquad.cpp
+++ b/dom/media/webaudio/blink/Biquad.cpp
@@ -38,17 +38,17 @@ namespace WebCore {
 
 Biquad::Biquad() {
   // Initialize as pass-thru (straight-wire, no filter effect)
   setNormalizedCoefficients(1, 0, 0, 1, 0, 0);
 
   reset();  // clear filter memory
 }
 
-Biquad::~Biquad() {}
+Biquad::~Biquad() = default;
 
 void Biquad::process(const float* sourceP, float* destP,
                      size_t framesToProcess) {
   // Create local copies of member variables
   double x1 = m_x1;
   double x2 = m_x2;
   double y1 = m_y1;
   double y2 = m_y2;
--- a/dom/media/webaudio/blink/IIRFilter.cpp
+++ b/dom/media/webaudio/blink/IIRFilter.cpp
@@ -24,17 +24,17 @@ IIRFilter::IIRFilter(const AudioDoubleAr
     : m_bufferIndex(0),
       m_feedback(feedbackCoef),
       m_feedforward(feedforwardCoef) {
   m_xBuffer.SetLength(kBufferLength);
   m_yBuffer.SetLength(kBufferLength);
   reset();
 }
 
-IIRFilter::~IIRFilter() {}
+IIRFilter::~IIRFilter() = default;
 
 void IIRFilter::reset() {
   memset(m_xBuffer.Elements(), 0, m_xBuffer.Length() * sizeof(double));
   memset(m_yBuffer.Elements(), 0, m_yBuffer.Length() * sizeof(double));
 }
 
 static std::complex<double> evaluatePolynomial(const double* coef,
                                                std::complex<double> z,
--- a/dom/media/webaudio/blink/PeriodicWave.h
+++ b/dom/media/webaudio/blink/PeriodicWave.h
@@ -78,17 +78,17 @@ class PeriodicWave {
   unsigned periodicWaveSize() const { return m_periodicWaveSize; }
   float sampleRate() const { return m_sampleRate; }
 
   size_t sizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
  private:
   explicit PeriodicWave(float sampleRate, size_t numberOfComponents,
                         bool disableNormalization);
-  ~PeriodicWave() {}
+  ~PeriodicWave() = default;
 
   void generateBasicWaveform(mozilla::dom::OscillatorType);
 
   float m_sampleRate;
   unsigned m_periodicWaveSize;
   unsigned m_numberOfRanges;
   float m_centsPerRange;
   unsigned m_numberOfComponents;
--- a/dom/media/webm/WebMDemuxer.h
+++ b/dom/media/webm/WebMDemuxer.h
@@ -59,20 +59,17 @@ class MediaRawDataQueue {
   }
 
   void Reset() {
     while (!mQueue.empty()) {
       mQueue.pop_front();
     }
   }
 
-  MediaRawDataQueue& operator=(const MediaRawDataQueue& aOther) {
-    mQueue = aOther.mQueue;
-    return *this;
-  }
+  MediaRawDataQueue& operator=(const MediaRawDataQueue& aOther) = delete;
 
   const RefPtr<MediaRawData>& First() const { return mQueue.front(); }
 
   const RefPtr<MediaRawData>& Last() const { return mQueue.back(); }
 
   // Methods for range-based for loops.
   ContainerType::iterator begin() { return mQueue.begin(); }
 
--- a/dom/media/webrtc/RTCCertificate.h
+++ b/dom/media/webrtc/RTCCertificate.h
@@ -58,17 +58,17 @@ class RTCCertificate final : public nsIS
   // Structured clone methods
   bool WriteStructuredClone(JSContext* aCx,
                             JSStructuredCloneWriter* aWriter) const;
   static already_AddRefed<RTCCertificate> ReadStructuredClone(
       JSContext* aCx, nsIGlobalObject* aGlobal,
       JSStructuredCloneReader* aReader);
 
  private:
-  ~RTCCertificate() {}
+  ~RTCCertificate() = default;
   void operator=(const RTCCertificate&) = delete;
   RTCCertificate(const RTCCertificate&) = delete;
 
   bool ReadCertificate(JSStructuredCloneReader* aReader);
   bool ReadPrivateKey(JSStructuredCloneReader* aReader);
   bool WriteCertificate(JSStructuredCloneWriter* aWriter) const;
   bool WritePrivateKey(JSStructuredCloneWriter* aWriter) const;
 
--- a/dom/media/webspeech/synth/SpeechSynthesis.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesis.cpp
@@ -64,17 +64,17 @@ SpeechSynthesis::SpeechSynthesis(nsPIDOM
 
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     obs->AddObserver(this, "inner-window-destroyed", true);
     obs->AddObserver(this, "synth-voices-changed", true);
   }
 }
 
-SpeechSynthesis::~SpeechSynthesis() {}
+SpeechSynthesis::~SpeechSynthesis() = default;
 
 JSObject* SpeechSynthesis::WrapObject(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return SpeechSynthesis_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 bool SpeechSynthesis::Pending() const {
   // If we don't have any task, nothing is pending. If we have only one task,
--- a/dom/media/webspeech/synth/SpeechSynthesisUtterance.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesisUtterance.cpp
@@ -31,17 +31,17 @@ SpeechSynthesisUtterance::SpeechSynthesi
     nsPIDOMWindowInner* aOwnerWindow, const nsAString& text)
     : DOMEventTargetHelper(aOwnerWindow),
       mText(text),
       mVolume(1),
       mRate(1),
       mPitch(1),
       mPaused(false) {}
 
-SpeechSynthesisUtterance::~SpeechSynthesisUtterance() {}
+SpeechSynthesisUtterance::~SpeechSynthesisUtterance() = default;
 
 JSObject* SpeechSynthesisUtterance::WrapObject(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SpeechSynthesisUtterance_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 nsISupports* SpeechSynthesisUtterance::GetParentObject() const {
   return GetOwner();
--- a/dom/media/webspeech/synth/SpeechSynthesisVoice.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesisVoice.cpp
@@ -18,17 +18,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 SpeechSynthesisVoice::SpeechSynthesisVoice(nsISupports* aParent,
                                            const nsAString& aUri)
     : mParent(aParent), mUri(aUri) {}
 
-SpeechSynthesisVoice::~SpeechSynthesisVoice() {}
+SpeechSynthesisVoice::~SpeechSynthesisVoice() = default;
 
 JSObject* SpeechSynthesisVoice::WrapObject(JSContext* aCx,
                                            JS::Handle<JSObject*> aGivenProto) {
   return SpeechSynthesisVoice_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 nsISupports* SpeechSynthesisVoice::GetParentObject() const { return mParent; }
 
--- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
+++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
@@ -67,17 +67,17 @@ void GetAllSpeechSynthActors(
 namespace mozilla {
 namespace dom {
 
 // VoiceData
 
 class VoiceData final {
  private:
   // Private destructor, to discourage deletion outside of Release():
-  ~VoiceData() {}
+  ~VoiceData() = default;
 
  public:
   VoiceData(nsISpeechService* aService, const nsAString& aUri,
             const nsAString& aName, const nsAString& aLang, bool aIsLocal,
             bool aQueuesUtterances)
       : mService(aService),
         mUri(aUri),
         mName(aName),
@@ -100,17 +100,17 @@ class VoiceData final {
   bool mIsQueued;
 };
 
 // GlobalQueueItem
 
 class GlobalQueueItem final {
  private:
   // Private destructor, to discourage deletion outside of Release():
-  ~GlobalQueueItem() {}
+  ~GlobalQueueItem() = default;
 
  public:
   GlobalQueueItem(VoiceData* aVoice, nsSpeechTask* aTask,
                   const nsAString& aText, const float& aVolume,
                   const float& aRate, const float& aPitch)
       : mVoice(aVoice),
         mTask(aTask),
         mText(aText),
--- a/dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
+++ b/dom/media/webspeech/synth/speechd/SpeechDispatcherService.cpp
@@ -135,17 +135,17 @@ class SpeechDispatcherVoice {
 
   // Voice name
   nsString mName;
 
   // Voice language, in BCP-47 syntax
   nsString mLanguage;
 
  private:
-  ~SpeechDispatcherVoice() {}
+  ~SpeechDispatcherVoice() = default;
 };
 
 class SpeechDispatcherCallback final : public nsISpeechTaskCallback {
  public:
   SpeechDispatcherCallback(nsISpeechTask* aTask,
                            SpeechDispatcherService* aService)
       : mTask(aTask), mService(aService) {}
 
@@ -153,17 +153,17 @@ class SpeechDispatcherCallback final : p
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(SpeechDispatcherCallback,
                                            nsISpeechTaskCallback)
 
   NS_DECL_NSISPEECHTASKCALLBACK
 
   bool OnSpeechEvent(SPDNotificationType state);
 
  private:
-  ~SpeechDispatcherCallback() {}
+  ~SpeechDispatcherCallback() = default;
 
   // This pointer is used to dispatch events
   nsCOMPtr<nsISpeechTask> mTask;
 
   // By holding a strong reference to the service we guarantee that it won't be
   // destroyed before this runnable.
   RefPtr<SpeechDispatcherService> mService;
 
--- a/dom/xhr/XMLHttpRequestString.cpp
+++ b/dom/xhr/XMLHttpRequestString.cpp
@@ -123,19 +123,16 @@ void XMLHttpRequestString::CreateSnapsho
 // ---------------------------------------------------------------------------
 // XMLHttpRequestStringSnapshot
 
 XMLHttpRequestStringSnapshot::XMLHttpRequestStringSnapshot()
     : mLength(0), mVoid(false) {}
 
 XMLHttpRequestStringSnapshot::~XMLHttpRequestStringSnapshot() = default;
 
-XMLHttpRequestStringSnapshot& XMLHttpRequestStringSnapshot::operator=(
-    const XMLHttpRequestStringSnapshot& aOther) = default;
-
 void XMLHttpRequestStringSnapshot::ResetInternal(bool aIsVoid) {
   mBuffer = nullptr;
   mLength = 0;
   mVoid = aIsVoid;
 }
 
 void XMLHttpRequestStringSnapshot::Set(XMLHttpRequestStringBuffer* aBuffer,
                                        uint32_t aLength) {
--- a/dom/xhr/XMLHttpRequestString.h
+++ b/dom/xhr/XMLHttpRequestString.h
@@ -89,17 +89,18 @@ class MOZ_STACK_CLASS XMLHttpRequestStri
 class XMLHttpRequestStringSnapshot final {
   friend class XMLHttpRequestStringBuffer;
   friend class XMLHttpRequestStringSnapshotReaderHelper;
 
  public:
   XMLHttpRequestStringSnapshot();
   ~XMLHttpRequestStringSnapshot();
 
-  XMLHttpRequestStringSnapshot& operator=(const XMLHttpRequestStringSnapshot&);
+  XMLHttpRequestStringSnapshot& operator=(const XMLHttpRequestStringSnapshot&) =
+      delete;
 
   void Reset() { ResetInternal(false /* isVoid */); }
 
   void SetVoid() { ResetInternal(true /* isVoid */); }
 
   bool IsVoid() const { return mVoid; }
 
   bool IsEmpty() const { return !mLength; }