From e9f743f2af751f1c3b42756ce18774e9716ee5e2 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Mon, 21 Nov 2016 12:23:17 -0800 Subject: [PATCH] Backed out 4 changesets (bug 1318004) for xpcshell failures a=backout Backed out changeset 6995bd33872b (bug 1318004) Backed out changeset 9be5c856bc78 (bug 1318004) Backed out changeset 365b0b7f289a (bug 1318004) Backed out changeset 2f2ebf176eac (bug 1318004) --- .../components/commandlines/nsCommandLine.cpp | 2 +- toolkit/components/ctypes/ctypes.cpp | 8 ++- toolkit/components/filepicker/nsFileView.cpp | 4 +- toolkit/components/find/nsFindService.cpp | 4 +- toolkit/components/mozintl/MozIntl.cpp | 8 ++- .../osfile/NativeOSFileInternals.cpp | 4 +- .../nsParentalControlsServiceDefault.cpp | 4 +- toolkit/components/perf/PerfMeasurement.cpp | 8 ++- .../places/tests/gtest/test_IHistory.cpp | 4 +- toolkit/components/reflect/reflect.cpp | 8 ++- .../components/remote/nsXRemoteService.cpp | 4 +- toolkit/components/telemetry/Telemetry.cpp | 33 ++++++---- .../telemetry/TelemetryHistogram.cpp | 21 ++++--- .../components/telemetry/TelemetryScalar.cpp | 10 ++-- .../components/terminator/nsTerminator.cpp | 21 +++---- .../components/url-classifier/HashStore.cpp | 3 +- toolkit/identity/IdentityCryptoService.cpp | 12 ++-- toolkit/mozapps/update/updater/updater.cpp | 60 +++++++++---------- toolkit/system/gnome/nsGConfService.cpp | 8 +-- toolkit/system/gnome/nsGIOService.cpp | 2 +- toolkit/system/gnome/nsGSettingsService.cpp | 8 +-- toolkit/system/gnome/nsPackageKitService.cpp | 8 +-- .../system/gnome/nsSystemAlertsService.cpp | 5 +- .../unixproxy/nsUnixSystemProxySettings.cpp | 2 +- toolkit/xre/nsAppRunner.cpp | 12 ++-- 25 files changed, 152 insertions(+), 111 deletions(-) diff --git a/toolkit/components/commandlines/nsCommandLine.cpp b/toolkit/components/commandlines/nsCommandLine.cpp index 1b7459891e30..280b1d24a6d8 100644 --- a/toolkit/components/commandlines/nsCommandLine.cpp +++ b/toolkit/components/commandlines/nsCommandLine.cpp @@ -55,7 +55,7 @@ public: nsCommandLine(); protected: - ~nsCommandLine() = default; + ~nsCommandLine() { } typedef nsresult (*EnumerateHandlersCallback)(nsICommandLineHandler* aHandler, nsICommandLine* aThis, diff --git a/toolkit/components/ctypes/ctypes.cpp b/toolkit/components/ctypes/ctypes.cpp index 42af6b3207e1..c2be533e4d95 100644 --- a/toolkit/components/ctypes/ctypes.cpp +++ b/toolkit/components/ctypes/ctypes.cpp @@ -50,9 +50,13 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Module) NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable) -Module::Module() = default; +Module::Module() +{ +} -Module::~Module() = default; +Module::~Module() +{ +} #define XPC_MAP_CLASSNAME Module #define XPC_MAP_QUOTED_CLASSNAME "Module" diff --git a/toolkit/components/filepicker/nsFileView.cpp b/toolkit/components/filepicker/nsFileView.cpp index 2110a92d2cfa..ad4471e86299 100644 --- a/toolkit/components/filepicker/nsFileView.cpp +++ b/toolkit/components/filepicker/nsFileView.cpp @@ -47,7 +47,7 @@ public: nsString mSearchString; uint16_t mSearchResult; private: - ~nsFileResult() = default; + ~nsFileResult() {} }; NS_IMPL_ISUPPORTS(nsFileResult, nsIAutoCompleteResult) @@ -179,7 +179,7 @@ NS_IMETHODIMP nsFileResult::RemoveValueAt(int32_t rowIndex, bool removeFromDb) class nsFileComplete final : public nsIAutoCompleteSearch { - ~nsFileComplete() = default; + ~nsFileComplete() {} public: NS_DECL_ISUPPORTS NS_DECL_NSIAUTOCOMPLETESEARCH diff --git a/toolkit/components/find/nsFindService.cpp b/toolkit/components/find/nsFindService.cpp index 545798387a25..3e80823ce0bc 100644 --- a/toolkit/components/find/nsFindService.cpp +++ b/toolkit/components/find/nsFindService.cpp @@ -22,7 +22,9 @@ nsFindService::nsFindService() } -nsFindService::~nsFindService() = default; +nsFindService::~nsFindService() +{ +} NS_IMPL_ISUPPORTS(nsFindService, nsIFindService) diff --git a/toolkit/components/mozintl/MozIntl.cpp b/toolkit/components/mozintl/MozIntl.cpp index 2a19dafb6e12..9c393c29605a 100644 --- a/toolkit/components/mozintl/MozIntl.cpp +++ b/toolkit/components/mozintl/MozIntl.cpp @@ -14,9 +14,13 @@ using namespace mozilla; NS_IMPL_ISUPPORTS(MozIntl, mozIMozIntl) -MozIntl::MozIntl() = default; +MozIntl::MozIntl() +{ +} -MozIntl::~MozIntl() = default; +MozIntl::~MozIntl() +{ +} NS_IMETHODIMP MozIntl::AddGetCalendarInfo(JS::Handle val, JSContext* cx) diff --git a/toolkit/components/osfile/NativeOSFileInternals.cpp b/toolkit/components/osfile/NativeOSFileInternals.cpp index 249484489075..e4725d390de9 100644 --- a/toolkit/components/osfile/NativeOSFileInternals.cpp +++ b/toolkit/components/osfile/NativeOSFileInternals.cpp @@ -741,7 +741,7 @@ public: , mResult(new TypedArrayResult(TimeStamp::Now())) { } - ~DoReadToTypedArrayEvent() override { + ~DoReadToTypedArrayEvent() { // If AbstractReadEvent::Run() has bailed out, we may need to cleanup // mResult, which is main-thread only data if (!mResult) { @@ -778,7 +778,7 @@ public: , mResult(new StringResult(TimeStamp::Now())) { } - ~DoReadToStringEvent() override { + ~DoReadToStringEvent() { // If AbstraactReadEvent::Run() has bailed out, we may need to cleanup // mResult, which is main-thread only data if (!mResult) { diff --git a/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp b/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp index bdc642544169..5d97b6f1b879 100644 --- a/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp +++ b/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp @@ -16,7 +16,9 @@ nsParentalControlsService::nsParentalControlsService() : mozilla::Unused << mEnabled; } -nsParentalControlsService::~nsParentalControlsService() = default; +nsParentalControlsService::~nsParentalControlsService() +{ +} NS_IMETHODIMP nsParentalControlsService::GetParentalControlsEnabled(bool *aResult) diff --git a/toolkit/components/perf/PerfMeasurement.cpp b/toolkit/components/perf/PerfMeasurement.cpp index ad583bb1de33..b0d9c86e5762 100644 --- a/toolkit/components/perf/PerfMeasurement.cpp +++ b/toolkit/components/perf/PerfMeasurement.cpp @@ -25,9 +25,13 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Module) NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable) -Module::Module() = default; +Module::Module() +{ +} -Module::~Module() = default; +Module::~Module() +{ +} #define XPC_MAP_CLASSNAME Module #define XPC_MAP_QUOTED_CLASSNAME "Module" diff --git a/toolkit/components/places/tests/gtest/test_IHistory.cpp b/toolkit/components/places/tests/gtest/test_IHistory.cpp index 7d35cd303560..430a5f87e8bc 100644 --- a/toolkit/components/places/tests/gtest/test_IHistory.cpp +++ b/toolkit/components/places/tests/gtest/test_IHistory.cpp @@ -51,7 +51,7 @@ new_test_uri() class VisitURIObserver final : public nsIObserver { - ~VisitURIObserver() = default; + ~VisitURIObserver() {} public: NS_DECL_ISUPPORTS @@ -309,7 +309,7 @@ namespace test_observer_topic_dispatched_helpers { #define URI_VISITED_RESOLUTION_TOPIC "visited-status-resolution" class statusObserver final : public nsIObserver { - ~statusObserver() = default; + ~statusObserver() {} public: NS_DECL_ISUPPORTS diff --git a/toolkit/components/reflect/reflect.cpp b/toolkit/components/reflect/reflect.cpp index 01ec11098cc3..d3f8ed3cf984 100644 --- a/toolkit/components/reflect/reflect.cpp +++ b/toolkit/components/reflect/reflect.cpp @@ -23,9 +23,13 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Module) NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable) -Module::Module() = default; +Module::Module() +{ +} -Module::~Module() = default; +Module::~Module() +{ +} #define XPC_MAP_CLASSNAME Module #define XPC_MAP_QUOTED_CLASSNAME "Module" diff --git a/toolkit/components/remote/nsXRemoteService.cpp b/toolkit/components/remote/nsXRemoteService.cpp index 947ba7c078b1..41a40e471939 100644 --- a/toolkit/components/remote/nsXRemoteService.cpp +++ b/toolkit/components/remote/nsXRemoteService.cpp @@ -110,7 +110,9 @@ FindExtensionParameterInCommand(const char* aParameterName, } -nsXRemoteService::nsXRemoteService() = default; +nsXRemoteService::nsXRemoteService() +{ +} void nsXRemoteService::XRemoteBaseStartup(const char *aAppName, const char *aProfileName) diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index 1f6edc751a59..ad2263c9b158 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -179,7 +179,9 @@ CombinedStacks::SizeOfExcludingThis() const { size_t n = 0; n += mModules.capacity() * sizeof(Telemetry::ProcessedStack::Module); n += mStacks.capacity() * sizeof(Stack); - for (const auto & s : mStacks) { + for (std::vector::const_iterator i = mStacks.begin(), + e = mStacks.end(); i != e; ++i) { + const Stack& s = *i; n += s.capacity() * sizeof(Telemetry::ProcessedStack::Frame); } return n; @@ -223,7 +225,7 @@ public: : mHangIndices(aOther.mHangIndices) , mAnnotations(Move(aOther.mAnnotations)) {} - ~AnnotationInfo() = default; + ~AnnotationInfo() {} AnnotationInfo& operator=(AnnotationInfo&& aOther) { mHangIndices = aOther.mHangIndices; @@ -427,7 +429,7 @@ public: * An implementation of Observe that records statistics of all * file IO operations. */ - void Observe(Observation& aOb) override; + void Observe(Observation& aOb); /** * Reflect recorded file IO statistics into Javascript @@ -1426,7 +1428,8 @@ IsValidBreakpadId(const std::string &breakpadId) { if (breakpadId.size() < 33) { return false; } - for (char c : breakpadId) { + for (unsigned i = 0, n = breakpadId.size(); i < n; ++i) { + char c = breakpadId[i]; if ((c < '0' || c > '9') && (c < 'A' || c > 'F')) { return false; } @@ -1589,11 +1592,13 @@ CreateJSHangAnnotations(JSContext* cx, const HangAnnotationsVector& annotations, // discard duplicated ones. nsTHashtable reportedAnnotations; size_t annotationIndex = 0; - for (const auto & curAnnotations : annotations) { + for (const HangAnnotationsPtr *i = annotations.begin(), *e = annotations.end(); + i != e; ++i) { JS::RootedObject jsAnnotation(cx, JS_NewPlainObject(cx)); if (!jsAnnotation) { continue; } + const HangAnnotationsPtr& curAnnotations = *i; // Build a key to index the current annotations in our hash set. nsAutoString annotationsKey; nsresult rv = ComputeAnnotationsKey(curAnnotations, annotationsKey); @@ -1728,9 +1733,9 @@ TelemetryImpl::GetThreadHangStats(JSContext* cx, JS::MutableHandle re // Add saved threads next MutexAutoLock autoLock(mThreadHangStatsMutex); - for (auto & stat : mThreadHangStats) { + for (size_t i = 0; i < mThreadHangStats.length(); i++) { JS::RootedObject obj(cx, - CreateJSThreadHangStats(cx, stat)); + CreateJSThreadHangStats(cx, mThreadHangStats[i])); if (!JS_DefineElement(cx, retObj, threadIndex++, obj, JSPROP_ENUMERATE)) { return NS_ERROR_FAILURE; } @@ -2566,7 +2571,9 @@ RecordShutdownEndTimeStamp() { namespace mozilla { namespace Telemetry { -ProcessedStack::ProcessedStack() = default; +ProcessedStack::ProcessedStack() +{ +} size_t ProcessedStack::GetStackSize() const { @@ -2678,7 +2685,9 @@ GetStackAndModules(const std::vector& aPCs) // Copy the information to the return value. ProcessedStack Ret; - for (auto & rawFrame : rawStack) { + for (std::vector::iterator i = rawStack.begin(), + e = rawStack.end(); i != e; ++i) { + const StackFrame &rawFrame = *i; mozilla::Telemetry::ProcessedStack::Frame frame = { rawFrame.mPC, rawFrame.mModIndex }; Ret.AddFrame(frame); } @@ -2748,10 +2757,10 @@ HangStack::AppendViaBuffer(const char* aText, size_t aLength) if (prevStart != mBuffer.begin()) { // The buffer has moved; we have to adjust pointers in the stack. - for (auto & entry : *this) { - if (entry >= prevStart && entry < prevEnd) { + for (const char** entry = this->begin(); entry != this->end(); entry++) { + if (*entry >= prevStart && *entry < prevEnd) { // Move from old buffer to new buffer. - entry += mBuffer.begin() - prevStart; + *entry += mBuffer.begin() - prevStart; } } } diff --git a/toolkit/components/telemetry/TelemetryHistogram.cpp b/toolkit/components/telemetry/TelemetryHistogram.cpp index 2d700348c72d..df41c217fa91 100644 --- a/toolkit/components/telemetry/TelemetryHistogram.cpp +++ b/toolkit/components/telemetry/TelemetryHistogram.cpp @@ -281,7 +281,8 @@ internal_GetRegisteredHistogramIds(bool keyed, uint32_t dataset, { nsTArray collection; - for (const auto & h : gHistograms) { + for (size_t i = 0; i < mozilla::ArrayLength(gHistograms); ++i) { + const HistogramInfo& h = gHistograms[i]; if (IsExpiredVersion(h.expiration()) || h.keyed != keyed || !IsInDataset(h.dataset, dataset)) { @@ -750,7 +751,9 @@ void internal_Accumulate(mozilla::Telemetry::ID aHistogram, uint32_t aSample); void internal_IdentifyCorruptHistograms(StatisticsRecorder::Histograms &hs) { - for (auto h : hs) { + for (HistogramIterator it = hs.begin(); it != hs.end(); ++it) { + Histogram *h = *it; + mozilla::Telemetry::ID id; nsresult rv = internal_GetHistogramEnumId(h->histogram_name().c_str(), &id); // This histogram isn't a static histogram, just ignore it. @@ -2061,7 +2064,8 @@ void TelemetryHistogram::InitializeGlobalState(bool canRecordBase, mozilla::PodArrayZero(gCorruptHistograms); // Create registered keyed histograms - for (const auto & h : gHistograms) { + for (size_t i = 0; i < mozilla::ArrayLength(gHistograms); ++i) { + const HistogramInfo& h = gHistograms[i]; if (!h.keyed) { continue; } @@ -2161,8 +2165,9 @@ void TelemetryHistogram::InitHistogramRecordingEnabled() { StaticMutexAutoLock locker(gTelemetryHistogramMutex); - for (auto recordingInitiallyDisabledID : kRecordingInitiallyDisabledIDs) { - internal_SetHistogramRecordingEnabled(recordingInitiallyDisabledID, + const size_t length = mozilla::ArrayLength(kRecordingInitiallyDisabledIDs); + for (size_t i = 0; i < length; i++) { + internal_SetHistogramRecordingEnabled(kRecordingInitiallyDisabledIDs[i], false); } } @@ -2397,7 +2402,8 @@ TelemetryHistogram::CreateHistogramSnapshots(JSContext *cx, // OK, now we can actually reflect things. JS::Rooted hobj(cx); - for (auto h : hs) { + for (HistogramIterator it = hs.begin(); it != hs.end(); ++it) { + Histogram *h = *it; if (!internal_ShouldReflectHistogram(h) || internal_IsEmpty(h) || internal_IsExpired(h)) { continue; @@ -2637,7 +2643,8 @@ TelemetryHistogram::GetHistogramSizesofIncludingThis(mozilla::MallocSizeOf StatisticsRecorder::Histograms hs; StatisticsRecorder::GetHistograms(&hs); size_t n = 0; - for (auto h : hs) { + for (HistogramIterator it = hs.begin(); it != hs.end(); ++it) { + Histogram *h = *it; n += h->SizeOfIncludingThis(aMallocSizeOf); } return n; diff --git a/toolkit/components/telemetry/TelemetryScalar.cpp b/toolkit/components/telemetry/TelemetryScalar.cpp index 47c17f3c4013..6e95580703f2 100644 --- a/toolkit/components/telemetry/TelemetryScalar.cpp +++ b/toolkit/components/telemetry/TelemetryScalar.cpp @@ -154,7 +154,7 @@ ScalarInfo::expiration() const class ScalarBase { public: - virtual ~ScalarBase() = default; + virtual ~ScalarBase() {}; // Set, Add and SetMaximum functions as described in the Telemetry IDL. virtual ScalarResult SetValue(nsIVariant* aValue) = 0; @@ -194,7 +194,7 @@ public: using ScalarBase::SetValue; ScalarUnsigned() : mStorage(0) {}; - ~ScalarUnsigned() override = default; + ~ScalarUnsigned() {}; ScalarResult SetValue(nsIVariant* aValue) final; void SetValue(uint32_t aValue) final; @@ -334,7 +334,7 @@ public: using ScalarBase::SetValue; ScalarString() : mStorage(EmptyString()) {}; - ~ScalarString() override = default; + ~ScalarString() {}; ScalarResult SetValue(nsIVariant* aValue) final; ScalarResult SetValue(const nsAString& aValue) final; @@ -415,7 +415,7 @@ public: using ScalarBase::SetValue; ScalarBoolean() : mStorage(false) {}; - ~ScalarBoolean() override = default; + ~ScalarBoolean() {}; ScalarResult SetValue(nsIVariant* aValue) final; void SetValue(bool aValue) final; @@ -514,7 +514,7 @@ public: typedef mozilla::Pair> KeyValuePair; explicit KeyedScalar(uint32_t aScalarKind) : mScalarKind(aScalarKind) {}; - ~KeyedScalar() = default; + ~KeyedScalar() {}; // Set, Add and SetMaximum functions as described in the Telemetry IDL. // These methods implicitly instantiate a Scalar[*] for each key. diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp index 0118ad9da339..f9459cc5d615 100644 --- a/toolkit/components/terminator/nsTerminator.cpp +++ b/toolkit/components/terminator/nsTerminator.cpp @@ -173,9 +173,10 @@ RunWatchdog(void* arg) class PR_CloseDelete { public: - constexpr PR_CloseDelete() = default; + constexpr PR_CloseDelete() {} - PR_CloseDelete(const PR_CloseDelete& aOther) = default; + PR_CloseDelete(const PR_CloseDelete& aOther) + {} void operator()(PRFileDesc* aPtr) const { @@ -341,8 +342,8 @@ nsTerminator::SelfInit() return NS_ERROR_UNEXPECTED; } - for (auto & shutdownStep : sShutdownSteps) { - DebugOnly rv = os->AddObserver(this, shutdownStep.mTopic, false); + for (size_t i = 0; i < ArrayLength(sShutdownSteps); ++i) { + DebugOnly rv = os->AddObserver(this, sShutdownSteps[i].mTopic, false); NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "AddObserver failed"); } @@ -506,18 +507,18 @@ nsTerminator::UpdateTelemetry() UniquePtr telemetryData(new nsCString()); telemetryData->AppendLiteral("{"); size_t fields = 0; - for (auto & shutdownStep : sShutdownSteps) { - if (shutdownStep.mTicks < 0) { + for (size_t i = 0; i < ArrayLength(sShutdownSteps); ++i) { + if (sShutdownSteps[i].mTicks < 0) { // Ignore this field. continue; } if (fields++ > 0) { telemetryData->Append(", "); } - telemetryData->AppendInt(shutdownStep.mTicks); - telemetryData->AppendLiteral(R"(")"); - telemetryData->Append(shutdownStep.mTopic); - telemetryData->AppendLiteral(R"(": )"); + telemetryData->AppendLiteral("\""); + telemetryData->Append(sShutdownSteps[i].mTopic); + telemetryData->AppendLiteral("\": "); + telemetryData->AppendInt(sShutdownSteps[i].mTicks); } telemetryData->AppendLiteral("}"); diff --git a/toolkit/components/url-classifier/HashStore.cpp b/toolkit/components/url-classifier/HashStore.cpp index 205befb2c8db..3d32dc6a247a 100644 --- a/toolkit/components/url-classifier/HashStore.cpp +++ b/toolkit/components/url-classifier/HashStore.cpp @@ -224,7 +224,8 @@ HashStore::HashStore(const nsACString& aTableName, } HashStore::~HashStore() -= default; +{ +} nsresult HashStore::Reset() diff --git a/toolkit/identity/IdentityCryptoService.cpp b/toolkit/identity/IdentityCryptoService.cpp index 0aeaed2f3f94..2bb3e794f0dc 100644 --- a/toolkit/identity/IdentityCryptoService.cpp +++ b/toolkit/identity/IdentityCryptoService.cpp @@ -56,7 +56,7 @@ public: KeyPair(SECKEYPrivateKey* aPrivateKey, SECKEYPublicKey* aPublicKey); private: - ~KeyPair() override + ~KeyPair() { nsNSSShutDownPreventionLock locker; if (isAlreadyShutDown()) { @@ -96,7 +96,7 @@ public: KeyGenRunnable(KeyType keyType, nsIIdentityKeyGenCallback * aCallback); private: - ~KeyGenRunnable() override + ~KeyGenRunnable() { nsNSSShutDownPreventionLock locker; if (isAlreadyShutDown()) { @@ -106,7 +106,7 @@ private: shutdown(ShutdownCalledFrom::Object); } - void virtualDestroyNSSReference() override + virtual void virtualDestroyNSSReference() override { destructorSafeDestroyNSSReference(); } @@ -133,7 +133,7 @@ public: nsIIdentitySignCallback * aCallback); private: - ~SignRunnable() override + ~SignRunnable() { nsNSSShutDownPreventionLock locker; if (isAlreadyShutDown()) { @@ -171,7 +171,7 @@ public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIIDENTITYCRYPTOSERVICE - IdentityCryptoService() = default; + IdentityCryptoService() { } nsresult Init() { nsresult rv; @@ -183,7 +183,7 @@ public: } private: - ~IdentityCryptoService() = default; + ~IdentityCryptoService() { } IdentityCryptoService(const KeyPair &) = delete; void operator=(const IdentityCryptoService &) = delete; }; diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index e50938defd8f..dc10d040b421 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -1086,7 +1086,7 @@ class Action { public: Action() : mProgressCost(1), mNext(nullptr) { } - virtual ~Action() = default; + virtual ~Action() { } virtual int Parse(NS_tchar *line) = 0; @@ -1115,10 +1115,10 @@ class RemoveFile : public Action public: RemoveFile() : mSkip(0) { } - int Parse(NS_tchar *line) override; - int Prepare() override; - int Execute() override; - void Finish(int status) override; + int Parse(NS_tchar *line); + int Prepare(); + int Execute(); + void Finish(int status); private: mozilla::UniquePtr mFile; @@ -1246,10 +1246,10 @@ class RemoveDir : public Action public: RemoveDir() : mSkip(0) { } - int Parse(NS_tchar *line) override; - int Prepare() override; // check that the source dir exists - int Execute() override; - void Finish(int status) override; + virtual int Parse(NS_tchar *line); + virtual int Prepare(); // check that the source dir exists + virtual int Execute(); + virtual void Finish(int status); private: mozilla::UniquePtr mDir; @@ -1363,10 +1363,10 @@ class AddFile : public Action public: AddFile() : mAdded(false) { } - int Parse(NS_tchar *line) override; - int Prepare() override; - int Execute() override; - void Finish(int status) override; + virtual int Parse(NS_tchar *line); + virtual int Prepare(); + virtual int Execute(); + virtual void Finish(int status); private: mozilla::UniquePtr mFile; @@ -1466,12 +1466,12 @@ class PatchFile : public Action public: PatchFile() : mPatchFile(nullptr), mPatchIndex(-1), buf(nullptr) { } - ~PatchFile() override; + virtual ~PatchFile(); - int Parse(NS_tchar *line) override; - int Prepare() override; // should check for patch file and for checksum here - int Execute() override; - void Finish(int status) override; + virtual int Parse(NS_tchar *line); + virtual int Prepare(); // should check for patch file and for checksum here + virtual int Execute(); + virtual void Finish(int status); private: int LoadSourceFile(FILE* ofile); @@ -1787,10 +1787,10 @@ PatchFile::Finish(int status) class AddIfFile : public AddFile { public: - int Parse(NS_tchar *line) override; - int Prepare() override; - int Execute() override; - void Finish(int status) override; + virtual int Parse(NS_tchar *line); + virtual int Prepare(); + virtual int Execute(); + virtual void Finish(int status); protected: mozilla::UniquePtr mTestFile; @@ -1848,10 +1848,10 @@ AddIfFile::Finish(int status) class AddIfNotFile : public AddFile { public: - int Parse(NS_tchar *line) override; - int Prepare() override; - int Execute() override; - void Finish(int status) override; + virtual int Parse(NS_tchar *line); + virtual int Prepare(); + virtual int Execute(); + virtual void Finish(int status); protected: mozilla::UniquePtr mTestFile; @@ -1909,10 +1909,10 @@ AddIfNotFile::Finish(int status) class PatchIfFile : public PatchFile { public: - int Parse(NS_tchar *line) override; - int Prepare() override; // should check for patch file and for checksum here - int Execute() override; - void Finish(int status) override; + virtual int Parse(NS_tchar *line); + virtual int Prepare(); // should check for patch file and for checksum here + virtual int Execute(); + virtual void Finish(int status); private: mozilla::UniquePtr mTestFile; diff --git a/toolkit/system/gnome/nsGConfService.cpp b/toolkit/system/gnome/nsGConfService.cpp index c722beee6ac2..ede71e5883a9 100644 --- a/toolkit/system/gnome/nsGConfService.cpp +++ b/toolkit/system/gnome/nsGConfService.cpp @@ -82,10 +82,10 @@ nsGConfService::Init() return NS_ERROR_FAILURE; } - for (auto GConfSymbol : kGConfSymbols) { - *GConfSymbol.function = - PR_FindFunctionSymbol(gconfLib, GConfSymbol.functionName); - if (!*GConfSymbol.function) { + for (uint32_t i = 0; i < ArrayLength(kGConfSymbols); i++) { + *kGConfSymbols[i].function = + PR_FindFunctionSymbol(gconfLib, kGConfSymbols[i].functionName); + if (!*kGConfSymbols[i].function) { return NS_ERROR_FAILURE; } } diff --git a/toolkit/system/gnome/nsGIOService.cpp b/toolkit/system/gnome/nsGIOService.cpp index 4d7c54674b78..9196c7d7629e 100644 --- a/toolkit/system/gnome/nsGIOService.cpp +++ b/toolkit/system/gnome/nsGIOService.cpp @@ -86,7 +86,7 @@ nsGIOMimeApp::Launch(const nsACString& aUri) class GIOUTF8StringEnumerator final : public nsIUTF8StringEnumerator { - ~GIOUTF8StringEnumerator() = default; + ~GIOUTF8StringEnumerator() { } public: GIOUTF8StringEnumerator() : mIndex(0) { } diff --git a/toolkit/system/gnome/nsGSettingsService.cpp b/toolkit/system/gnome/nsGSettingsService.cpp index ff25721873ee..d8c46b4fe253 100644 --- a/toolkit/system/gnome/nsGSettingsService.cpp +++ b/toolkit/system/gnome/nsGSettingsService.cpp @@ -308,10 +308,10 @@ nsGSettingsService::Init() return NS_ERROR_FAILURE; } - for (auto GSettingsSymbol : kGSettingsSymbols) { - *GSettingsSymbol.function = - PR_FindFunctionSymbol(gioLib, GSettingsSymbol.functionName); - if (!*GSettingsSymbol.function) { + for (uint32_t i = 0; i < ArrayLength(kGSettingsSymbols); i++) { + *kGSettingsSymbols[i].function = + PR_FindFunctionSymbol(gioLib, kGSettingsSymbols[i].functionName); + if (!*kGSettingsSymbols[i].function) { return NS_ERROR_FAILURE; } } diff --git a/toolkit/system/gnome/nsPackageKitService.cpp b/toolkit/system/gnome/nsPackageKitService.cpp index 9c14bc4e89f6..c32a9136742e 100644 --- a/toolkit/system/gnome/nsPackageKitService.cpp +++ b/toolkit/system/gnome/nsPackageKitService.cpp @@ -93,10 +93,10 @@ nsPackageKitService::Init() return NS_ERROR_FAILURE; } - for (auto GDBusSymbol : kGDBusSymbols) { - *GDBusSymbol.function = - PR_FindFunctionSymbol(gioLib, GDBusSymbol.functionName); - if (!*GDBusSymbol.function) { + for (uint32_t i = 0; i < ArrayLength(kGDBusSymbols); i++) { + *kGDBusSymbols[i].function = + PR_FindFunctionSymbol(gioLib, kGDBusSymbols[i].functionName); + if (!*kGDBusSymbols[i].function) { return NS_ERROR_FAILURE; } } diff --git a/toolkit/system/gnome/nsSystemAlertsService.cpp b/toolkit/system/gnome/nsSystemAlertsService.cpp index af4e8d088247..2af64383cba7 100644 --- a/toolkit/system/gnome/nsSystemAlertsService.cpp +++ b/toolkit/system/gnome/nsSystemAlertsService.cpp @@ -18,10 +18,11 @@ NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService) NS_INTERFACE_MAP_END_THREADSAFE nsSystemAlertsService::nsSystemAlertsService() -= default; +{ +} nsSystemAlertsService::~nsSystemAlertsService() -= default; +{} nsresult nsSystemAlertsService::Init() diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp index 8fa15042397d..c190da91d367 100644 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp @@ -33,7 +33,7 @@ public: nsresult Init(); private: - ~nsUnixSystemProxySettings() = default; + ~nsUnixSystemProxySettings() {} nsCOMPtr mGConf; nsCOMPtr mGSettings; diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index ef84e33f8284..b46b56405dae 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2748,18 +2748,18 @@ static struct SavedVar { static void SaveStateForAppInitiatedRestart() { - for (auto & savedVar : gSavedVars) { - const char *s = PR_GetEnv(savedVar.name); + for (size_t i = 0; i < ArrayLength(gSavedVars); ++i) { + const char *s = PR_GetEnv(gSavedVars[i].name); if (s) - savedVar.value = PR_smprintf("%s=%s", savedVar.name, s); + gSavedVars[i].value = PR_smprintf("%s=%s", gSavedVars[i].name, s); } } static void RestoreStateForAppInitiatedRestart() { - for (auto & savedVar : gSavedVars) { - if (savedVar.value) - PR_SetEnv(savedVar.value); + for (size_t i = 0; i < ArrayLength(gSavedVars); ++i) { + if (gSavedVars[i].value) + PR_SetEnv(gSavedVars[i].value); } }