Bug 1403698 Address delete-non-virtual-dtor warnings r=froydnj

MozReview-Commit-ID: 44XiqegImiT

--HG--
extra : rebase_source : 52ddc3caa3243aaef9e2397b4a28e318da101a8c
This commit is contained in:
Tom Ritter 2017-10-06 11:27:35 -05:00
Родитель ac3f580c91
Коммит 349f097743
7 изменённых файлов: 23 добавлений и 18 удалений

20
dom/plugins/ipc/PluginUtilsWin.cpp Normal file → Executable file
Просмотреть файл

@ -45,7 +45,7 @@ protected:
const PluginModuleSet* mAudioNotificationSet;
};
class AudioNotification : public IMMNotificationClient
class AudioNotification final : public IMMNotificationClient
{
public:
AudioNotification() :
@ -70,15 +70,6 @@ public:
mIsRegistered = true;
}
~AudioNotification()
{
MOZ_ASSERT(!mIsRegistered,
"Destroying AudioNotification without first calling Unregister");
if (mDeviceEnum) {
mDeviceEnum->Release();
}
}
// IMMNotificationClient Implementation
HRESULT STDMETHODCALLTYPE
OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR device_id) override
@ -195,6 +186,15 @@ private:
// Set of plugin modules that have registered to be notified when the audio device
// changes.
PluginModuleSet mAudioNotificationSet;
~AudioNotification()
{
MOZ_ASSERT(!mIsRegistered,
"Destroying AudioNotification without first calling Unregister");
if (mDeviceEnum) {
mDeviceEnum->Release();
}
}
}; // class AudioNotification
// callback that gets notified of audio device events, or NULL

5
gfx/2d/NativeFontResourceDWrite.cpp Normal file → Executable file
Просмотреть файл

@ -81,7 +81,7 @@ private:
static IDWriteFontFileLoader* mInstance;
};
class DWriteFontFileStream : public IDWriteFontFileStream
class DWriteFontFileStream final : public IDWriteFontFileStream
{
public:
/**
@ -93,7 +93,6 @@ public:
* @param aData Font data
*/
DWriteFontFileStream(uint8_t *aData, uint32_t aSize, uint64_t aFontFileKey);
~DWriteFontFileStream();
// IUnknown interface
IFACEMETHOD(QueryInterface)(IID const& iid, OUT void** ppObject)
@ -139,6 +138,8 @@ private:
std::vector<uint8_t> mData;
Atomic<uint32_t> mRefCnt;
uint64_t mFontFileKey;
~DWriteFontFileStream();
};
IDWriteFontFileLoader* DWriteFontFileLoader::mInstance = nullptr;

4
gfx/layers/d3d11/TextureD3D11.cpp Normal file → Executable file
Просмотреть файл

@ -32,7 +32,7 @@ static const GUID sD3D11TextureUsage =
/* This class gets its lifetime tied to a D3D texture
* and increments memory usage on construction and decrements
* on destruction */
class TextureMemoryMeasurer : public IUnknown
class TextureMemoryMeasurer final : public IUnknown
{
public:
explicit TextureMemoryMeasurer(size_t aMemoryUsed)
@ -72,6 +72,8 @@ public:
private:
int mRefCnt;
int mMemoryUsed;
~TextureMemoryMeasurer() = default;
};
static DXGI_FORMAT

4
widget/windows/InkCollector.h Normal file → Executable file
Просмотреть файл

@ -13,7 +13,7 @@
#define MOZ_WM_PEN_LEAVES_HOVER_OF_DIGITIZER WM_USER + 0x83
class InkCollectorEvent : public _IInkCollectorEvents
class InkCollectorEvent final : public _IInkCollectorEvents
{
public:
// IUnknown
@ -46,6 +46,8 @@ protected:
private:
uint32_t mRefCount = 0;
~InkCollectorEvent() = default;
};
class InkCollector

2
widget/windows/JumpListBuilder.cpp Normal file → Executable file
Просмотреть файл

@ -47,7 +47,7 @@ NS_IMPL_ISUPPORTS(JumpListBuilder, nsIJumpListBuilder, nsIObserver)
namespace detail {
class DoneCommitListBuildCallback : public nsIRunnable
class DoneCommitListBuildCallback final : public nsIRunnable
{
NS_DECL_THREADSAFE_ISUPPORTS

4
widget/windows/PDFViaEMFPrintHelper.h Normal file → Executable file
Просмотреть файл

@ -29,7 +29,7 @@ class PDFViaEMFPrintHelper
{
public:
PDFViaEMFPrintHelper();
~PDFViaEMFPrintHelper();
virtual ~PDFViaEMFPrintHelper();
/** Loads the specified PDF file. */
NS_IMETHOD OpenDocument(nsIFile *aFile);
@ -60,4 +60,4 @@ protected:
} // namespace widget
} // namespace mozilla
#endif /* PDFVIAEMFPRINTHELPER_H_ */
#endif /* PDFVIAEMFPRINTHELPER_H_ */

2
widget/windows/nsDataObj.cpp Normal file → Executable file
Просмотреть файл

@ -439,7 +439,7 @@ STDMETHODIMP_(ULONG) nsDataObj::AddRef()
}
namespace {
class RemoveTempFileHelper : public nsIObserver
class RemoveTempFileHelper final : public nsIObserver
{
public:
explicit RemoveTempFileHelper(nsIFile* aTempFile)