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"); JS::TraceEdge(trc, &mJSObj, "nsJSObjWrapperKey");
} }
nsJSObjWrapperKey(const nsJSObjWrapperKey& other) nsJSObjWrapperKey(nsJSObjWrapperKey&& other) = default;
: mJSObj(other.mJSObj), mNpp(other.mNpp) {} nsJSObjWrapperKey& operator=(nsJSObjWrapperKey&& other) = default;
void operator=(const nsJSObjWrapperKey& other) {
mJSObj = other.mJSObj;
mNpp = other.mNpp;
}
JS::Heap<JSObject*> mJSObj; JS::Heap<JSObject*> mJSObj;
NPP mNpp; NPP mNpp;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -52,7 +52,7 @@ class PluginLibrary {
public: public:
typedef mozilla::gfx::DrawTarget DrawTarget; typedef mozilla::gfx::DrawTarget DrawTarget;
virtual ~PluginLibrary() {} virtual ~PluginLibrary() = default;
/** /**
* Inform this library about the nsNPAPIPlugin which owns it. This * 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) {} explicit PluginOfflineObserver(PluginModuleChromeParent* pmp) : mPmp(pmp) {}
private: private:
~PluginOfflineObserver() {} ~PluginOfflineObserver() = default;
PluginModuleChromeParent* mPmp; PluginModuleChromeParent* mPmp;
}; };

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

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