Bug 2053404 - Cleanup default state for static-analysis on Windows / dom part r=media-playback-reviewers,webrtc-reviewers,dom-worker-reviewers,bwc,alwu,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D311050
This commit is contained in:
committed by
sguelton@mozilla.com
parent
dbc850b10f
commit
d80b662fa5
@@ -62,9 +62,9 @@ enum class ListAllowance { eDisallow, eAllow };
|
||||
* mValues.
|
||||
*/
|
||||
struct PropertyValuesPair {
|
||||
PropertyValuesPair() : mProperty(eCSSProperty_UNKNOWN) {}
|
||||
PropertyValuesPair() = default;
|
||||
|
||||
CSSPropertyId mProperty;
|
||||
CSSPropertyId mProperty{eCSSProperty_UNKNOWN};
|
||||
nsTArray<nsCString> mValues;
|
||||
};
|
||||
|
||||
|
||||
@@ -162,8 +162,6 @@ AudioChannelService::AudioChannelService() {
|
||||
}
|
||||
}
|
||||
|
||||
AudioChannelService::~AudioChannelService() = default;
|
||||
|
||||
void AudioChannelService::RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
|
||||
AudibleState aAudible) {
|
||||
MOZ_ASSERT(aAgent);
|
||||
|
||||
@@ -156,7 +156,7 @@ class AudioChannelService final : public nsIObserver {
|
||||
|
||||
private:
|
||||
AudioChannelService();
|
||||
~AudioChannelService();
|
||||
~AudioChannelService() = default;
|
||||
|
||||
void RefreshAgents(nsPIDOMWindowOuter* aWindow,
|
||||
const std::function<void(AudioChannelAgent*)>& aFunc);
|
||||
|
||||
@@ -1175,7 +1175,7 @@ class BeaconStreamListener final : public nsIStreamListener {
|
||||
~BeaconStreamListener() = default;
|
||||
|
||||
public:
|
||||
BeaconStreamListener() : mLoadGroup(nullptr) {}
|
||||
BeaconStreamListener() = default;
|
||||
|
||||
void SetLoadGroup(nsILoadGroup* aLoadGroup) { mLoadGroup = aLoadGroup; }
|
||||
|
||||
@@ -1184,7 +1184,7 @@ class BeaconStreamListener final : public nsIStreamListener {
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup{};
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(BeaconStreamListener, nsIStreamListener, nsIRequestObserver)
|
||||
|
||||
Vendored
-4
@@ -14,10 +14,6 @@ void Action::CancelOnInitiatingThread() {
|
||||
mCanceled = true;
|
||||
}
|
||||
|
||||
Action::Action() : mCanceled(false) {}
|
||||
|
||||
Action::~Action() = default;
|
||||
|
||||
bool Action::IsCanceled() const { return mCanceled; }
|
||||
|
||||
} // namespace mozilla::dom::cache
|
||||
|
||||
Vendored
+3
-3
@@ -45,7 +45,7 @@ class Action : public SafeRefCounted<Action> {
|
||||
};
|
||||
|
||||
// virtual because deleted through base class pointer
|
||||
virtual ~Action();
|
||||
virtual ~Action() = default;
|
||||
|
||||
// Execute operations on the target thread. Once complete call
|
||||
// Resolver::Resolve(). This can be done sync or async.
|
||||
@@ -85,7 +85,7 @@ class Action : public SafeRefCounted<Action> {
|
||||
MOZ_DECLARE_REFCOUNTED_TYPENAME(cache::Action)
|
||||
|
||||
protected:
|
||||
Action();
|
||||
Action() = default;
|
||||
|
||||
// Check if this Action has been canceled. May be called from any thread,
|
||||
// but typically used from the target thread.
|
||||
@@ -93,7 +93,7 @@ class Action : public SafeRefCounted<Action> {
|
||||
|
||||
private:
|
||||
// Accessible from any thread.
|
||||
Atomic<bool> mCanceled;
|
||||
Atomic<bool> mCanceled{false};
|
||||
};
|
||||
|
||||
} // namespace mozilla::dom::cache
|
||||
|
||||
@@ -38,8 +38,6 @@ ClientWindowState& ClientWindowState::operator=(ClientWindowState&& aRight) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
ClientWindowState::~ClientWindowState() = default;
|
||||
|
||||
mozilla::dom::VisibilityState ClientWindowState::VisibilityState() const {
|
||||
return mData->visibilityState();
|
||||
}
|
||||
@@ -82,8 +80,6 @@ ClientWorkerState& ClientWorkerState::operator=(ClientWorkerState&& aRight) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
ClientWorkerState::~ClientWorkerState() = default;
|
||||
|
||||
StorageAccess ClientWorkerState::GetStorageAccess() const {
|
||||
return mData->storageAccess();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class ClientWindowState final {
|
||||
|
||||
ClientWindowState& operator=(ClientWindowState&& aRight);
|
||||
|
||||
~ClientWindowState();
|
||||
~ClientWindowState() = default;
|
||||
|
||||
mozilla::dom::VisibilityState VisibilityState() const;
|
||||
|
||||
@@ -84,7 +84,7 @@ class ClientWorkerState final {
|
||||
|
||||
ClientWorkerState& operator=(ClientWorkerState&& aRight);
|
||||
|
||||
~ClientWorkerState();
|
||||
~ClientWorkerState() = default;
|
||||
|
||||
StorageAccess GetStorageAccess() const;
|
||||
|
||||
|
||||
@@ -14,14 +14,6 @@
|
||||
|
||||
using mozilla::ControllerCommand;
|
||||
|
||||
// this value is used to size the hash table. Just a sensible upper bound
|
||||
#define NUM_COMMANDS_LENGTH 32
|
||||
|
||||
nsControllerCommandTable::nsControllerCommandTable()
|
||||
: mCommandsTable(NUM_COMMANDS_LENGTH) {}
|
||||
|
||||
nsControllerCommandTable::~nsControllerCommandTable() = default;
|
||||
|
||||
void nsControllerCommandTable::RegisterCommand(const nsACString& aName,
|
||||
ControllerCommand* aCommand) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(mMutable);
|
||||
|
||||
@@ -17,7 +17,7 @@ class nsICommandParams;
|
||||
|
||||
class nsControllerCommandTable final {
|
||||
public:
|
||||
nsControllerCommandTable();
|
||||
nsControllerCommandTable() = default;
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING(nsControllerCommandTable);
|
||||
|
||||
@@ -38,10 +38,12 @@ class nsControllerCommandTable final {
|
||||
void GetSupportedCommands(nsTArray<nsCString>&) const;
|
||||
|
||||
private:
|
||||
~nsControllerCommandTable();
|
||||
~nsControllerCommandTable() = default;
|
||||
// This value is used to size the hash table. Just a sensible upper bound
|
||||
static constexpr size_t num_commands_length = 32;
|
||||
// Hash table of nsIControllerCommands, keyed by command name.
|
||||
nsRefPtrHashtable<nsCStringHashKey, mozilla::ControllerCommand>
|
||||
mCommandsTable;
|
||||
mCommandsTable{num_commands_length};
|
||||
|
||||
// Are we mutable?
|
||||
bool mMutable = true;
|
||||
|
||||
@@ -16,9 +16,6 @@ using mozilla::dom::ConsoleUtils;
|
||||
|
||||
NS_IMPL_ISUPPORTS(ConsoleReportCollector, nsIConsoleReportCollector)
|
||||
|
||||
ConsoleReportCollector::ConsoleReportCollector()
|
||||
: mMutex("mozilla::ConsoleReportCollector") {}
|
||||
|
||||
void ConsoleReportCollector::AddConsoleReport(
|
||||
uint32_t aErrorFlags, const nsACString& aCategory,
|
||||
PropertiesFile aPropertiesFile, const nsACString& aSourceFileURI,
|
||||
|
||||
@@ -17,7 +17,7 @@ class ConsoleReportCollected;
|
||||
|
||||
class ConsoleReportCollector final : public nsIConsoleReportCollector {
|
||||
public:
|
||||
ConsoleReportCollector();
|
||||
ConsoleReportCollector() = default;
|
||||
|
||||
void AddConsoleReport(uint32_t aErrorFlags, const nsACString& aCategory,
|
||||
PropertiesFile aPropertiesFile,
|
||||
@@ -76,7 +76,7 @@ class ConsoleReportCollector final : public nsIConsoleReportCollector {
|
||||
const CopyableTArray<nsString> mStringParams;
|
||||
};
|
||||
|
||||
Mutex mMutex;
|
||||
Mutex mMutex{"mozilla::ConsoleReportCollector"};
|
||||
|
||||
// protected by mMutex
|
||||
nsTArray<PendingReport> mPendingReports MOZ_GUARDED_BY(mMutex);
|
||||
|
||||
@@ -149,7 +149,7 @@ class Gamepad {
|
||||
}
|
||||
|
||||
private:
|
||||
Gamepad() {}
|
||||
Gamepad() = default;
|
||||
};
|
||||
|
||||
// Drop this in favor of decltype when we require a new enough SDK.
|
||||
@@ -1174,7 +1174,7 @@ class StartWindowsGamepadServiceRunnable final : public Runnable {
|
||||
}
|
||||
|
||||
private:
|
||||
~StartWindowsGamepadServiceRunnable() {}
|
||||
~StartWindowsGamepadServiceRunnable() = default;
|
||||
};
|
||||
|
||||
class StopWindowsGamepadServiceRunnable final : public Runnable {
|
||||
@@ -1198,7 +1198,7 @@ class StopWindowsGamepadServiceRunnable final : public Runnable {
|
||||
}
|
||||
|
||||
private:
|
||||
~StopWindowsGamepadServiceRunnable() {}
|
||||
~StopWindowsGamepadServiceRunnable() = default;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -53,7 +53,7 @@ class PreallocatedProcessManagerImpl final : public nsIObserver {
|
||||
static StaticRefPtr<PreallocatedProcessManagerImpl> sSingleton;
|
||||
|
||||
PreallocatedProcessManagerImpl();
|
||||
~PreallocatedProcessManagerImpl();
|
||||
~PreallocatedProcessManagerImpl() = default;
|
||||
|
||||
void Init();
|
||||
|
||||
@@ -115,7 +115,6 @@ PreallocatedProcessManagerImpl::PreallocatedProcessManagerImpl()
|
||||
// Note: mPreallocatedProcesses may not be null, but all processes should
|
||||
// be dead (IsDead==true). We block Erase() when our observer sees
|
||||
// shutdown starting.
|
||||
PreallocatedProcessManagerImpl::~PreallocatedProcessManagerImpl() = default;
|
||||
|
||||
void PreallocatedProcessManagerImpl::Init() {
|
||||
Preferences::AddStrongObserver(this, "dom.ipc.processPrelaunch.enabled");
|
||||
|
||||
@@ -63,8 +63,6 @@ MozExternalRefCountType RefMessageBodyService::Release() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
RefMessageBodyService::~RefMessageBodyService() = default;
|
||||
|
||||
const nsID RefMessageBodyService::Register(
|
||||
already_AddRefed<RefMessageBody> aBody, ErrorResult& aRv) {
|
||||
RefPtr<RefMessageBody> body = aBody;
|
||||
|
||||
@@ -122,7 +122,7 @@ class RefMessageBodyService final {
|
||||
|
||||
private:
|
||||
explicit RefMessageBodyService(const StaticMutexAutoLock& aProofOfLock);
|
||||
~RefMessageBodyService();
|
||||
~RefMessageBodyService() = default;
|
||||
|
||||
protected:
|
||||
::mozilla::ThreadSafeAutoRefCnt mRefCnt;
|
||||
|
||||
@@ -22,9 +22,6 @@ struct CallbackThreadRegistrySingleton {
|
||||
UniquePtr<CallbackThreadRegistry> mRegistry;
|
||||
};
|
||||
|
||||
CallbackThreadRegistry::CallbackThreadRegistry()
|
||||
: mThreadIds("CallbackThreadRegistry::mThreadIds") {}
|
||||
|
||||
/* static */
|
||||
CallbackThreadRegistry* CallbackThreadRegistry::Get() {
|
||||
static CallbackThreadRegistrySingleton sSingleton;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace mozilla {
|
||||
// path.
|
||||
class CallbackThreadRegistry final {
|
||||
public:
|
||||
CallbackThreadRegistry();
|
||||
CallbackThreadRegistry() = default;
|
||||
|
||||
// It would be nice to be able to assert that all threads have been
|
||||
// unregistered, but we can't: it's legal to suspend an audio stream, so
|
||||
@@ -47,7 +47,8 @@ class CallbackThreadRegistry final {
|
||||
ProfilerThreadId mId; // from profiler_current_thread_id
|
||||
int mUserCount = 0;
|
||||
};
|
||||
DataMutex<nsTArray<ThreadUserCount>> mThreadIds;
|
||||
DataMutex<nsTArray<ThreadUserCount>> mThreadIds{
|
||||
"CallbackThreadRegistry::mThreadIds"};
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -116,7 +116,8 @@ struct GraphInterface : public nsISupports {
|
||||
mSwitchedRunnable = nullptr;
|
||||
}
|
||||
};
|
||||
Variant<Undefined, StillProcessing, Stop, SwitchDriver> mResult;
|
||||
Variant<Undefined, StillProcessing, Stop, SwitchDriver> mResult{
|
||||
Undefined()};
|
||||
|
||||
explicit IterationResult(StillProcessing&& aArg)
|
||||
: mResult(std::move(aArg)) {}
|
||||
@@ -124,7 +125,7 @@ struct GraphInterface : public nsISupports {
|
||||
explicit IterationResult(SwitchDriver&& aArg) : mResult(std::move(aArg)) {}
|
||||
|
||||
public:
|
||||
IterationResult() : mResult(Undefined()) {}
|
||||
IterationResult() = default;
|
||||
IterationResult(const IterationResult&) = delete;
|
||||
IterationResult(IterationResult&&) = default;
|
||||
|
||||
@@ -393,7 +394,7 @@ class MediaTrackGraphInitThreadRunnable;
|
||||
*/
|
||||
class ThreadedDriver : public GraphDriver {
|
||||
class IterationWaitHelper {
|
||||
Monitor mMonitor MOZ_UNANNOTATED;
|
||||
Monitor mMonitor MOZ_UNANNOTATED{"IterationWaitHelper::mMonitor"};
|
||||
// The below members are guarded by mMonitor.
|
||||
|
||||
// Whether another iteration is required either to process control
|
||||
@@ -404,7 +405,7 @@ class ThreadedDriver : public GraphDriver {
|
||||
TimeStamp mWakeTime;
|
||||
|
||||
public:
|
||||
IterationWaitHelper() : mMonitor("IterationWaitHelper::mMonitor") {}
|
||||
IterationWaitHelper() = default;
|
||||
|
||||
/**
|
||||
* If another iteration is needed we wait for aDuration, otherwise we wait
|
||||
|
||||
@@ -190,6 +190,4 @@ VideoSegment::VideoSegment()
|
||||
VideoSegment::VideoSegment(VideoSegment&& aSegment)
|
||||
: MediaSegmentBase<VideoSegment, VideoChunk>(std::move(aSegment)) {}
|
||||
|
||||
VideoSegment::~VideoSegment() = default;
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -116,7 +116,7 @@ class VideoSegment : public MediaSegmentBase<VideoSegment, VideoChunk> {
|
||||
VideoSegment(const VideoSegment&) = delete;
|
||||
VideoSegment& operator=(const VideoSegment&) = delete;
|
||||
|
||||
~VideoSegment();
|
||||
~VideoSegment() = default;
|
||||
|
||||
void AppendFrame(const VideoChunk& aChunk,
|
||||
const Maybe<bool>& aForceBlack = Nothing(),
|
||||
|
||||
@@ -60,7 +60,7 @@ WMFCDMProxy::WMFCDMProxy(dom::MediaKeys* aKeys, const nsAString& aKeySystem,
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
|
||||
WMFCDMProxy::~WMFCDMProxy() {}
|
||||
WMFCDMProxy::~WMFCDMProxy() = default;
|
||||
|
||||
void WMFCDMProxy::Init(PromiseId aPromiseId, const nsAString& aOrigin,
|
||||
const nsAString& aTopLevelOrigin,
|
||||
|
||||
@@ -19,8 +19,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TimeRanges)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
TimeRanges::TimeRanges() : mParent(nullptr) {}
|
||||
|
||||
TimeRanges::TimeRanges(nsISupports* aParent) : mParent(aParent) {}
|
||||
|
||||
TimeRanges::TimeRanges(nsISupports* aParent,
|
||||
|
||||
@@ -27,7 +27,7 @@ class TimeRanges final : public nsISupports, public nsWrapperCache {
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_FINAL
|
||||
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(TimeRanges)
|
||||
|
||||
TimeRanges();
|
||||
TimeRanges() = default;
|
||||
explicit TimeRanges(nsISupports* aParent);
|
||||
explicit TimeRanges(const media::TimeIntervals& aTimeIntervals);
|
||||
explicit TimeRanges(const media::TimeRanges& aTimeRanges);
|
||||
|
||||
@@ -50,9 +50,7 @@ class AudioDecoderInputTrack final : public ProcessedMediaTrack {
|
||||
struct Empty {};
|
||||
struct ClearFutureData {};
|
||||
struct DecodedData {
|
||||
DecodedData()
|
||||
: mStartTime(media::TimeUnit::Invalid()),
|
||||
mEndTime(media::TimeUnit::Invalid()) {}
|
||||
DecodedData() = default;
|
||||
DecodedData(DecodedData&& aDecodedData)
|
||||
: mSegment(std::move(aDecodedData.mSegment)) {
|
||||
mStartTime = aDecodedData.mStartTime;
|
||||
@@ -69,12 +67,12 @@ class AudioDecoderInputTrack final : public ProcessedMediaTrack {
|
||||
mEndTime = media::TimeUnit::Invalid();
|
||||
}
|
||||
AudioSegment mSegment;
|
||||
media::TimeUnit mStartTime;
|
||||
media::TimeUnit mEndTime;
|
||||
media::TimeUnit mStartTime{media::TimeUnit::Invalid()};
|
||||
media::TimeUnit mEndTime{media::TimeUnit::Invalid()};
|
||||
};
|
||||
struct EOS {};
|
||||
|
||||
SPSCData() : mData(Empty()) {};
|
||||
SPSCData() = default;
|
||||
explicit SPSCData(ClearFutureData&& aArg) : mData(std::move(aArg)) {};
|
||||
explicit SPSCData(DecodedData&& aArg) : mData(std::move(aArg)) {};
|
||||
explicit SPSCData(EOS&& aArg) : mData(std::move(aArg)) {};
|
||||
@@ -88,7 +86,7 @@ class AudioDecoderInputTrack final : public ProcessedMediaTrack {
|
||||
return IsDecodedData() ? &mData.as<DecodedData>() : nullptr;
|
||||
}
|
||||
|
||||
Variant<Empty, ClearFutureData, DecodedData, EOS> mData;
|
||||
Variant<Empty, ClearFutureData, DecodedData, EOS> mData{Empty()};
|
||||
};
|
||||
|
||||
// Decoder thread API
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
OggCodecStore::OggCodecStore() : mMonitor("CodecStore") {}
|
||||
|
||||
OggCodecState* OggCodecStore::Add(uint32_t serial,
|
||||
UniquePtr<OggCodecState> codecState) {
|
||||
MonitorAutoLock mon(mMonitor);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace mozilla {
|
||||
// streams.
|
||||
class OggCodecStore {
|
||||
public:
|
||||
OggCodecStore();
|
||||
OggCodecStore() = default;
|
||||
OggCodecState* Add(uint32_t serial, UniquePtr<OggCodecState> codecState);
|
||||
bool Contains(uint32_t serial);
|
||||
OggCodecState* Get(uint32_t serial);
|
||||
@@ -27,7 +27,7 @@ class OggCodecStore {
|
||||
nsClassHashtable<nsUint32HashKey, OggCodecState> mCodecStates;
|
||||
|
||||
// Protects the |mCodecStates| and the |mKnownStreams| members.
|
||||
Monitor mMonitor MOZ_UNANNOTATED;
|
||||
Monitor mMonitor MOZ_UNANNOTATED{"CodecStore"};
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -185,7 +185,7 @@ UniquePtr<OmxAudioConfig> ConfigForMime(const nsACString& aMimeType) {
|
||||
|
||||
class OmxCommonVideoConfig : public OmxVideoConfig {
|
||||
public:
|
||||
explicit OmxCommonVideoConfig() : OmxVideoConfig() {}
|
||||
explicit OmxCommonVideoConfig() = default;
|
||||
|
||||
OMX_ERRORTYPE Apply(OmxPlatformLayer& aOmx, const VideoInfo& aInfo) override {
|
||||
OMX_ERRORTYPE err = OMX_ErrorNone;
|
||||
|
||||
@@ -326,7 +326,7 @@ static Atomic<uint32_t> sDXVAVideosCount(0);
|
||||
class D3D11DXVA2Manager : public DXVA2Manager {
|
||||
public:
|
||||
D3D11DXVA2Manager();
|
||||
virtual ~D3D11DXVA2Manager();
|
||||
virtual ~D3D11DXVA2Manager() = default;
|
||||
|
||||
HRESULT Init(layers::KnowsCompositor* aKnowsCompositor,
|
||||
nsACString& aFailureReason, ID3D11Device* aDevice);
|
||||
@@ -609,8 +609,6 @@ bool D3D11DXVA2Manager::SupportsConfig(const VideoInfo& aInfo,
|
||||
D3D11DXVA2Manager::D3D11DXVA2Manager()
|
||||
: mZeroCopyUsageInfo(new layers::ZeroCopyUsageInfo) {}
|
||||
|
||||
D3D11DXVA2Manager::~D3D11DXVA2Manager() {}
|
||||
|
||||
IUnknown* D3D11DXVA2Manager::GetDXVADeviceManager() {
|
||||
MutexAutoLock lock(mLock);
|
||||
return mDXGIDeviceManager;
|
||||
|
||||
@@ -22,8 +22,6 @@ WMFMediaDataDecoder::WMFMediaDataDecoder(MFTManager* aMFTManager)
|
||||
"WMFMediaDataDecoder")),
|
||||
mMFTManager(aMFTManager) {}
|
||||
|
||||
WMFMediaDataDecoder::~WMFMediaDataDecoder() {}
|
||||
|
||||
RefPtr<MediaDataDecoder::InitPromise> WMFMediaDataDecoder::Init() {
|
||||
MOZ_ASSERT(!mIsShutDown);
|
||||
return InitPromise::CreateAndResolve(mMFTManager->GetType(), __func__);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace mozilla {
|
||||
// by the MFT into a MediaData object.
|
||||
class MFTManager {
|
||||
public:
|
||||
virtual ~MFTManager() {}
|
||||
virtual ~MFTManager() = default;
|
||||
|
||||
// Submit a compressed sample for decoding.
|
||||
// This should forward to the MFTDecoder after performing
|
||||
@@ -126,7 +126,7 @@ class WMFMediaDataDecoder final
|
||||
virtual void SetSeekThreshold(const media::TimeUnit& aTime) override;
|
||||
|
||||
private:
|
||||
~WMFMediaDataDecoder();
|
||||
~WMFMediaDataDecoder() = default;
|
||||
|
||||
RefPtr<DecodePromise> ProcessError(HRESULT aError, const char* aReason);
|
||||
|
||||
|
||||
@@ -42,8 +42,6 @@ MediaSystemResourceService::MediaSystemResourceService() : mDestroyed(false) {
|
||||
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
|
||||
}
|
||||
|
||||
MediaSystemResourceService::~MediaSystemResourceService() = default;
|
||||
|
||||
void MediaSystemResourceService::Destroy() { mDestroyed = true; }
|
||||
|
||||
void MediaSystemResourceService::Acquire(
|
||||
|
||||
@@ -38,7 +38,7 @@ class MediaSystemResourceService {
|
||||
|
||||
private:
|
||||
MediaSystemResourceService();
|
||||
~MediaSystemResourceService();
|
||||
~MediaSystemResourceService() = default;
|
||||
|
||||
struct MediaSystemResourceRequest {
|
||||
MediaSystemResourceRequest() : mParent(nullptr), mId(-1) {}
|
||||
|
||||
@@ -44,8 +44,7 @@ class MediaTransportHandler {
|
||||
// as appropriate.
|
||||
static already_AddRefed<MediaTransportHandler> Create();
|
||||
|
||||
explicit MediaTransportHandler()
|
||||
: mStateCacheMutex("MediaTransportHandler::mStateCacheMutex") {}
|
||||
explicit MediaTransportHandler() = default;
|
||||
|
||||
typedef MozPromise<dom::Sequence<nsString>, nsresult, true> IceLogPromise;
|
||||
|
||||
@@ -186,7 +185,7 @@ class MediaTransportHandler {
|
||||
Maybe<dom::RTCErrorParams> aError = Nothing());
|
||||
virtual void Destroy() = 0;
|
||||
virtual ~MediaTransportHandler() = default;
|
||||
mutable Mutex mStateCacheMutex;
|
||||
mutable Mutex mStateCacheMutex{"MediaTransportHandler::mStateCacheMutex"};
|
||||
std::map<std::string, TransportLayer::State> mStateCache;
|
||||
std::map<std::string, TransportLayer::State> mRtcpStateCache;
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ class RsdparsaSdp final : public Sdp {
|
||||
void Serialize(std::ostream&) const override;
|
||||
|
||||
private:
|
||||
RsdparsaSdp() : mOrigin("", 0, 0, sdp::kIPv4, "") {}
|
||||
RsdparsaSdp() = default;
|
||||
RsdparsaSdp(const RsdparsaSdp& aOrig);
|
||||
|
||||
RsdparsaSessionHandle mSession;
|
||||
SdpOrigin mOrigin;
|
||||
SdpOrigin mOrigin{"", 0, 0, sdp::kIPv4, ""};
|
||||
UniquePtr<RsdparsaSdpAttributeList> mAttributeList;
|
||||
std::vector<UniquePtr<RsdparsaSdpMediaSection>> mMediaSections;
|
||||
};
|
||||
|
||||
@@ -62,14 +62,14 @@ class SipccSdp final : public Sdp {
|
||||
private:
|
||||
using InternalResults = SdpParser::InternalResults;
|
||||
|
||||
SipccSdp() : mOrigin("", 0, 0, sdp::kIPv4, ""), mAttributeList(nullptr) {}
|
||||
SipccSdp() = default;
|
||||
|
||||
bool Load(sdp_t* sdp, InternalResults& results);
|
||||
bool LoadOrigin(sdp_t* sdp, InternalResults& results);
|
||||
|
||||
SdpOrigin mOrigin;
|
||||
SdpOrigin mOrigin{"", 0, 0, sdp::kIPv4, ""};
|
||||
SipccSdpBandwidths mBandwidths;
|
||||
SipccSdpAttributeList mAttributeList;
|
||||
SipccSdpAttributeList mAttributeList{nullptr};
|
||||
std::vector<UniquePtr<SipccSdpMediaSection>> mMediaSections;
|
||||
};
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class SapiCallback final : public nsISpeechTaskCallback {
|
||||
void OnSpeechEvent(const SPEVENT& speechEvent);
|
||||
|
||||
private:
|
||||
~SapiCallback() {}
|
||||
~SapiCallback() = default;
|
||||
|
||||
float GetTimeDurationFromStart() const {
|
||||
TimeDuration duration = TimeStamp::Now() - mStartingTime;
|
||||
@@ -189,7 +189,7 @@ NS_IMPL_RELEASE(SapiService)
|
||||
|
||||
SapiService::SapiService() : mInitialized(false) {}
|
||||
|
||||
SapiService::~SapiService() {}
|
||||
SapiService::~SapiService() = default;
|
||||
|
||||
bool SapiService::Init() {
|
||||
AUTO_PROFILER_LABEL("SapiService::Init", OTHER);
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
namespace mozilla::dom {
|
||||
|
||||
MIDIMessageQueue::MIDIMessageQueue() : mMutex("MIDIMessageQueue::mMutex") {}
|
||||
|
||||
class MIDIMessageTimestampComparator {
|
||||
public:
|
||||
bool Equals(const MIDIMessage& a, const MIDIMessage& b) const {
|
||||
|
||||
@@ -27,7 +27,7 @@ class MIDIMessage;
|
||||
*/
|
||||
class MIDIMessageQueue {
|
||||
public:
|
||||
MIDIMessageQueue();
|
||||
MIDIMessageQueue() = default;
|
||||
~MIDIMessageQueue() = default;
|
||||
// Adds an array of possibly out-of-order messages to our queue.
|
||||
void Add(nsTArray<MIDIMessage>& aMsg);
|
||||
@@ -47,7 +47,7 @@ class MIDIMessageQueue {
|
||||
// Array of messages to be sent.
|
||||
nsTArray<MIDIMessage> mMessageQueue;
|
||||
// Mutex for coordinating cross thread array access.
|
||||
Mutex mMutex MOZ_UNANNOTATED;
|
||||
Mutex mMutex MOZ_UNANNOTATED{"MIDIMessageQueue::mMutex"};
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
||||
@@ -35,10 +35,10 @@ class PersistenceScope {
|
||||
|
||||
using DataType = Variant<Value, Set, Null>;
|
||||
|
||||
DataType mData;
|
||||
DataType mData{Null{}};
|
||||
|
||||
public:
|
||||
PersistenceScope() : mData(Null()) {}
|
||||
PersistenceScope() = default;
|
||||
|
||||
bool operator==(const PersistenceScope& aOther) = delete;
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ class SVGNumberList {
|
||||
*/
|
||||
class SVGNumberListAndInfo : public SVGNumberList {
|
||||
public:
|
||||
SVGNumberListAndInfo() : mElement(nullptr) {}
|
||||
SVGNumberListAndInfo() = default;
|
||||
|
||||
explicit SVGNumberListAndInfo(dom::SVGElement* aElement)
|
||||
: mElement(do_GetWeakReference(static_cast<nsINode*>(aElement))) {}
|
||||
@@ -192,7 +192,7 @@ class SVGNumberListAndInfo : public SVGNumberList {
|
||||
// cached baseVal SMILValue. See the comments starting at:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=515116#c15
|
||||
// See also https://bugzilla.mozilla.org/show_bug.cgi?id=653497
|
||||
nsWeakPtr mElement;
|
||||
nsWeakPtr mElement{nullptr};
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -60,9 +60,6 @@ already_AddRefed<WorkerCSPEventListener> WorkerCSPEventListener::Create(
|
||||
return listener.forget();
|
||||
}
|
||||
|
||||
WorkerCSPEventListener::WorkerCSPEventListener()
|
||||
: mMutex("WorkerCSPEventListener::mMutex") {}
|
||||
|
||||
NS_IMETHODIMP
|
||||
WorkerCSPEventListener::OnCSPViolationEvent(const nsAString& aJSON,
|
||||
const nsAString& aReportGroupName) {
|
||||
|
||||
@@ -24,10 +24,10 @@ class WorkerCSPEventListener final : public nsICSPEventListener {
|
||||
WorkerPrivate* aWorkerPrivate);
|
||||
|
||||
private:
|
||||
WorkerCSPEventListener();
|
||||
WorkerCSPEventListener() = default;
|
||||
~WorkerCSPEventListener() = default;
|
||||
|
||||
Mutex mMutex;
|
||||
Mutex mMutex{"WorkerCSPEventListener::mMutex"};
|
||||
|
||||
// Protected by mutex.
|
||||
RefPtr<WeakWorkerRef> mWorkerRef MOZ_GUARDED_BY(mMutex);
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
|
||||
namespace mozilla::dom {
|
||||
|
||||
WorkerDocumentListener::WorkerDocumentListener()
|
||||
: mMutex("mozilla::dom::WorkerDocumentListener::mMutex") {}
|
||||
|
||||
WorkerDocumentListener::~WorkerDocumentListener() = default;
|
||||
|
||||
RefPtr<WorkerDocumentListener> WorkerDocumentListener::Create(
|
||||
WorkerPrivate* aWorkerPrivate) {
|
||||
MOZ_ASSERT(aWorkerPrivate);
|
||||
|
||||
@@ -18,7 +18,7 @@ class WorkerDocumentListener final {
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WorkerDocumentListener)
|
||||
|
||||
public:
|
||||
WorkerDocumentListener();
|
||||
WorkerDocumentListener() = default;
|
||||
|
||||
void OnVisible(bool aVisible);
|
||||
void SetListening(uint64_t aWindowID, bool aListen);
|
||||
@@ -27,9 +27,10 @@ class WorkerDocumentListener final {
|
||||
static RefPtr<WorkerDocumentListener> Create(WorkerPrivate* aWorkerPrivate);
|
||||
|
||||
private:
|
||||
~WorkerDocumentListener();
|
||||
~WorkerDocumentListener() = default;
|
||||
|
||||
Mutex mMutex MOZ_UNANNOTATED; // protects mWorkerRef
|
||||
Mutex mMutex MOZ_UNANNOTATED{
|
||||
"mozilla::dom::WorkerDocumentListener::mMutex"}; // protects mWorkerRef
|
||||
RefPtr<ThreadSafeWorkerRef> mWorkerRef;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user