mirror of
https://github.com/mozilla-firefox/firefox
synced 2026-08-12 12:35:33 +00:00
Bug 2053404 - Cleanup default state for static-analysis on Windows / ipc part r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D311058
This commit is contained in:
committed by
sguelton@mozilla.com
parent
7fccdd0453
commit
df4e34ff76
@@ -28,7 +28,7 @@ class MessagePumpWin : public MessagePump {
|
||||
//
|
||||
class Observer {
|
||||
public:
|
||||
virtual ~Observer() {}
|
||||
virtual ~Observer() = default;
|
||||
|
||||
// This method is called before processing a message.
|
||||
// The message may be undefined in which case msg.message is 0
|
||||
@@ -49,14 +49,14 @@ class MessagePumpWin : public MessagePump {
|
||||
// from Dispatch.
|
||||
class Dispatcher {
|
||||
public:
|
||||
virtual ~Dispatcher() {}
|
||||
virtual ~Dispatcher() = default;
|
||||
// Dispatches the event. If true is returned processing continues as
|
||||
// normal. If false is returned, the nested loop exits immediately.
|
||||
virtual bool Dispatch(const MSG& msg) = 0;
|
||||
};
|
||||
|
||||
MessagePumpWin() : have_work_(0), state_(nullptr) {}
|
||||
virtual ~MessagePumpWin() {}
|
||||
virtual ~MessagePumpWin() = default;
|
||||
|
||||
// Add an Observer, which will start receiving notifications immediately.
|
||||
void AddObserver(Observer* observer);
|
||||
@@ -273,7 +273,7 @@ class MessagePumpForIO : public MessagePumpWin {
|
||||
//
|
||||
class IOHandler {
|
||||
public:
|
||||
virtual ~IOHandler() {}
|
||||
virtual ~IOHandler() = default;
|
||||
// This will be called once the pending IO operation associated with
|
||||
// |context| completes. |error| is the Win32 error code of the IO operation
|
||||
// (ERROR_SUCCESS if there was no error). |bytes_transfered| will be zero
|
||||
@@ -297,7 +297,7 @@ class MessagePumpForIO : public MessagePumpWin {
|
||||
};
|
||||
|
||||
MessagePumpForIO();
|
||||
virtual ~MessagePumpForIO() {}
|
||||
virtual ~MessagePumpForIO() = default;
|
||||
|
||||
// MessagePump methods:
|
||||
virtual void ScheduleWork();
|
||||
|
||||
@@ -38,7 +38,7 @@ class PageLoadTrackerUnitTest;
|
||||
|
||||
class TimeDelta {
|
||||
public:
|
||||
TimeDelta() : delta_(0) {}
|
||||
TimeDelta() = default;
|
||||
|
||||
// Converts units of time to TimeDeltas.
|
||||
static TimeDelta FromDays(int64_t days);
|
||||
@@ -124,7 +124,7 @@ class TimeDelta {
|
||||
explicit TimeDelta(int64_t delta_us) : delta_(delta_us) {}
|
||||
|
||||
// Delta in microseconds.
|
||||
int64_t delta_;
|
||||
int64_t delta_{0};
|
||||
};
|
||||
|
||||
inline TimeDelta operator*(int64_t a, TimeDelta td) {
|
||||
@@ -164,7 +164,7 @@ class Time {
|
||||
};
|
||||
|
||||
// Contains the NULL time. Use Time::Now() to get the current time.
|
||||
explicit Time() : us_(0) {}
|
||||
explicit Time() = default;
|
||||
|
||||
// Returns true if the time object has not been initialized.
|
||||
bool is_null() const { return us_ == 0; }
|
||||
@@ -278,7 +278,7 @@ class Time {
|
||||
static const int64_t kTimeTToMicrosecondsOffset;
|
||||
|
||||
// Time in microseconds in UTC.
|
||||
int64_t us_;
|
||||
int64_t us_{0};
|
||||
};
|
||||
|
||||
inline Time TimeDelta::operator+(Time t) const { return Time(t.us_ + delta_); }
|
||||
@@ -319,7 +319,7 @@ inline TimeDelta TimeDelta::FromMicroseconds(int64_t us) {
|
||||
|
||||
class TimeTicks {
|
||||
public:
|
||||
TimeTicks() : ticks_(0) {}
|
||||
TimeTicks() = default;
|
||||
TimeTicks(const TimeTicks&) = default;
|
||||
|
||||
// Platform-dependent tick count representing "right now."
|
||||
@@ -378,7 +378,7 @@ class TimeTicks {
|
||||
explicit TimeTicks(int64_t ticks) : ticks_(ticks) {}
|
||||
|
||||
// Tick count in microseconds.
|
||||
int64_t ticks_;
|
||||
int64_t ticks_{0};
|
||||
};
|
||||
|
||||
inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
|
||||
|
||||
@@ -35,8 +35,6 @@ FileDescriptor::FileDescriptor(PlatformHandleType aHandle)
|
||||
FileDescriptor::FileDescriptor(UniquePlatformHandle&& aHandle)
|
||||
: mHandle(std::move(aHandle)) {}
|
||||
|
||||
FileDescriptor::~FileDescriptor() = default;
|
||||
|
||||
FileDescriptor& FileDescriptor::operator=(const FileDescriptor& aOther) {
|
||||
if (this != &aOther) {
|
||||
mHandle = aOther.ClonePlatformHandle();
|
||||
|
||||
@@ -44,7 +44,7 @@ class FileDescriptor {
|
||||
|
||||
explicit FileDescriptor(UniquePlatformHandle&& aHandle);
|
||||
|
||||
~FileDescriptor();
|
||||
~FileDescriptor() = default;
|
||||
|
||||
FileDescriptor& operator=(const FileDescriptor& aOther);
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class MessagePumpForNonMainUIThreads final : public base::MessagePumpForUI,
|
||||
}
|
||||
|
||||
private:
|
||||
~MessagePumpForNonMainUIThreads() {}
|
||||
~MessagePumpForNonMainUIThreads() = default;
|
||||
|
||||
bool mInWait MOZ_GUARDED_BY(mWaitLock);
|
||||
mozilla::Mutex mWaitLock;
|
||||
|
||||
@@ -824,7 +824,7 @@ bool MessageChannel::WaitForSyncNotify() {
|
||||
NeuteredWindowRegion neuteredRgn(true);
|
||||
|
||||
{
|
||||
while (1) {
|
||||
while (true) {
|
||||
MSG msg = {0};
|
||||
// Don't get wrapped up in here if the child connection dies.
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class ProfilerMarkerChannelHook final : public IChannelHook {
|
||||
~ProfilerMarkerChannelHook() = default;
|
||||
|
||||
public:
|
||||
ProfilerMarkerChannelHook() : mRefCnt(0) {}
|
||||
ProfilerMarkerChannelHook() = default;
|
||||
|
||||
// IUnknown
|
||||
STDMETHODIMP QueryInterface(REFIID aIid, void** aOutInterface) override;
|
||||
@@ -91,7 +91,7 @@ class ProfilerMarkerChannelHook final : public IChannelHook {
|
||||
void BuildMarkerName(REFIID aIid, nsACString& aOutMarkerName);
|
||||
|
||||
private:
|
||||
mozilla::Atomic<ULONG> mRefCnt;
|
||||
mozilla::Atomic<ULONG> mRefCnt{0};
|
||||
};
|
||||
|
||||
HRESULT ProfilerMarkerChannelHook::QueryInterface(REFIID aIid,
|
||||
|
||||
Reference in New Issue
Block a user