Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/plugins. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D65184

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2020-03-06 09:12:46 +00:00
Родитель ac33c1f119
Коммит 480328f3ad
14 изменённых файлов: 19 добавлений и 23 удалений

Просмотреть файл

@ -33,12 +33,8 @@ class nsJSObjWrapperKey {
JS::TraceEdge(trc, &mJSObj, "nsJSObjWrapperKey");
}
nsJSObjWrapperKey(const nsJSObjWrapperKey& other)
: mJSObj(other.mJSObj), mNpp(other.mNpp) {}
void operator=(const nsJSObjWrapperKey& other) {
mJSObj = other.mJSObj;
mNpp = other.mNpp;
}
nsJSObjWrapperKey(nsJSObjWrapperKey&& other) = default;
nsJSObjWrapperKey& operator=(nsJSObjWrapperKey&& other) = default;
JS::Heap<JSObject*> mJSObj;
NPP mNpp;

Просмотреть файл

@ -3282,7 +3282,7 @@ nsPluginDOMContextMenuListener::nsPluginDOMContextMenuListener(
aContent->AddEventListener(NS_LITERAL_STRING("contextmenu"), this, true);
}
nsPluginDOMContextMenuListener::~nsPluginDOMContextMenuListener() {}
nsPluginDOMContextMenuListener::~nsPluginDOMContextMenuListener() = default;
NS_IMPL_ISUPPORTS(nsPluginDOMContextMenuListener, nsIDOMEventListener)

Просмотреть файл

@ -44,7 +44,7 @@ nsPluginNativeWindowImpl::nsPluginNativeWindowImpl() : nsPluginNativeWindow() {
#endif
}
nsPluginNativeWindowImpl::~nsPluginNativeWindowImpl() {}
nsPluginNativeWindowImpl::~nsPluginNativeWindowImpl() = default;
nsresult PLUG_NewPluginNativeWindow(
nsPluginNativeWindow** aPluginNativeWindow) {

Просмотреть файл

@ -528,7 +528,7 @@ class ChannelRedirectProxyCallback : public nsIAsyncVerifyRedirectCallback {
mOldChannel(oldChannel),
mNewChannel(newChannel) {}
ChannelRedirectProxyCallback() {}
ChannelRedirectProxyCallback() = default;
NS_DECL_ISUPPORTS
@ -543,7 +543,7 @@ class ChannelRedirectProxyCallback : public nsIAsyncVerifyRedirectCallback {
}
private:
virtual ~ChannelRedirectProxyCallback() {}
virtual ~ChannelRedirectProxyCallback() = default;
nsWeakPtr mWeakListener;
nsCOMPtr<nsIAsyncVerifyRedirectCallback> mParent;

Просмотреть файл

@ -156,7 +156,7 @@ static nsresult IsEnabledStateLockedForPlugin(nsIInternalPluginTag* aTag,
uint32_t nsIInternalPluginTag::sNextId;
nsIInternalPluginTag::nsIInternalPluginTag() {}
nsIInternalPluginTag::nsIInternalPluginTag() = default;
nsIInternalPluginTag::nsIInternalPluginTag(const char* aName,
const char* aDescription,
@ -180,7 +180,7 @@ nsIInternalPluginTag::nsIInternalPluginTag(
mMimeDescriptions(aMimeDescriptions),
mExtensions(aExtensions) {}
nsIInternalPluginTag::~nsIInternalPluginTag() {}
nsIInternalPluginTag::~nsIInternalPluginTag() = default;
bool nsIInternalPluginTag::HasExtension(const nsACString& aExtension,
nsACString& aMatchingType) const {
@ -714,7 +714,7 @@ nsFakePluginTag::nsFakePluginTag(uint32_t aId,
mSandboxScript(aSandboxScript),
mState(nsPluginTag::ePluginState_Enabled) {}
nsFakePluginTag::~nsFakePluginTag() {}
nsFakePluginTag::~nsFakePluginTag() = default;
NS_IMPL_ADDREF(nsFakePluginTag)
NS_IMPL_RELEASE(nsFakePluginTag)

Просмотреть файл

@ -60,7 +60,7 @@ bool nsPluginsDir::IsPluginFile(nsIFile* file) {
nsPluginFile::nsPluginFile(nsIFile* file) : mPlugin(file) {}
nsPluginFile::~nsPluginFile() {}
nsPluginFile::~nsPluginFile() = default;
nsresult nsPluginFile::LoadPlugin(PRLibrary** outLibrary) {
PRLibSpec libSpec;

Просмотреть файл

@ -26,7 +26,7 @@ class ChildTimer {
*/
ChildTimer(PluginInstanceChild* instance, uint32_t interval, bool repeat,
TimerFunc func);
~ChildTimer() {}
~ChildTimer() = default;
uint32_t ID() const { return mID; }

Просмотреть файл

@ -1130,7 +1130,7 @@ class FDMonitor : public Monitor {
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FDMonitor)
private:
~FDMonitor() {}
~FDMonitor() = default;
};
/**

Просмотреть файл

@ -30,7 +30,7 @@ class FunctionHookArray;
class FunctionHook {
public:
virtual ~FunctionHook() {}
virtual ~FunctionHook() = default;
virtual FunctionHookId FunctionId() const = 0;

Просмотреть файл

@ -15,7 +15,7 @@ PluginBackgroundDestroyerParent::PluginBackgroundDestroyerParent(
gfxASurface* aDyingBackground)
: mDyingBackground(aDyingBackground) {}
PluginBackgroundDestroyerParent::~PluginBackgroundDestroyerParent() {}
PluginBackgroundDestroyerParent::~PluginBackgroundDestroyerParent() = default;
void PluginBackgroundDestroyerParent::ActorDestroy(ActorDestroyReason why) {
switch (why) {

Просмотреть файл

@ -42,8 +42,8 @@ class PluginBackgroundDestroyerParent
*/
class PluginBackgroundDestroyerChild : public PPluginBackgroundDestroyerChild {
public:
PluginBackgroundDestroyerChild() {}
virtual ~PluginBackgroundDestroyerChild() {}
PluginBackgroundDestroyerChild() = default;
virtual ~PluginBackgroundDestroyerChild() = default;
private:
// Implementing this for good hygiene.

Просмотреть файл

@ -52,7 +52,7 @@ class PluginLibrary {
public:
typedef mozilla::gfx::DrawTarget DrawTarget;
virtual ~PluginLibrary() {}
virtual ~PluginLibrary() = default;
/**
* Inform this library about the nsNPAPIPlugin which owns it. This

Просмотреть файл

@ -1706,7 +1706,7 @@ class PluginOfflineObserver final : public nsIObserver {
explicit PluginOfflineObserver(PluginModuleChromeParent* pmp) : mPmp(pmp) {}
private:
~PluginOfflineObserver() {}
~PluginOfflineObserver() = default;
PluginModuleChromeParent* mPmp;
};

Просмотреть файл

@ -26,7 +26,7 @@ class PluginProcessChild : public mozilla::ipc::ProcessChild {
explicit PluginProcessChild(ProcessId aParentPid)
: ProcessChild(aParentPid), mPlugin(true) {}
virtual ~PluginProcessChild() {}
virtual ~PluginProcessChild() = default;
virtual bool Init(int aArgc, char* aArgv[]) override;
virtual void CleanUp() override;