bug 1328964 add override to ~WorkletJSContext/Runtime and use = default r?baku
Addresses modernize-use-override and modernize-use-equals-default
clang-tidy suggestions in "part 2 - Worklet Thread".
MozReview-Commit-ID: H1a9kBCF1Q6
--- a/dom/worklet/WorkletThread.cpp
+++ b/dom/worklet/WorkletThread.cpp
@@ -105,19 +105,17 @@ const JSWrapObjectCallbacks WrapObjectCa
class WorkletJSRuntime final : public mozilla::CycleCollectedJSRuntime
{
public:
explicit WorkletJSRuntime(JSContext* aCx)
: CycleCollectedJSRuntime(aCx)
{
}
- ~WorkletJSRuntime()
- {
- }
+ ~WorkletJSRuntime() override = default;
virtual void
PrepareForForgetSkippable() override
{
}
virtual void
BeginCycleCollectionCallback() override
@@ -152,17 +150,17 @@ public:
: mWorkletThread(aWorkletThread)
{
MOZ_ASSERT(aWorkletThread);
MOZ_ASSERT(!NS_IsMainThread());
nsCycleCollector_startup();
}
- ~WorkletJSContext()
+ ~WorkletJSContext() override
{
MOZ_ASSERT(!NS_IsMainThread());
JSContext* cx = MaybeContext();
if (!cx) {
return; // Initialize() must have failed
}