зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 4 changesets (bug 1318004
) for xpcshell failures a=backout CLOSED TREE
Backed out changeset a3fe53641526 (bug1318004
) Backed out changeset a5d1676b6f88 (bug1318004
) Backed out changeset b56b37f0f4d7 (bug1318004
) Backed out changeset fb5254baf1cb (bug1318004
)
This commit is contained in:
Родитель
733e06d21b
Коммит
9cd626a6a3
|
@ -55,7 +55,7 @@ public:
|
||||||
nsCommandLine();
|
nsCommandLine();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~nsCommandLine() = default;
|
~nsCommandLine() { }
|
||||||
|
|
||||||
typedef nsresult (*EnumerateHandlersCallback)(nsICommandLineHandler* aHandler,
|
typedef nsresult (*EnumerateHandlersCallback)(nsICommandLineHandler* aHandler,
|
||||||
nsICommandLine* aThis,
|
nsICommandLine* aThis,
|
||||||
|
|
|
@ -50,9 +50,13 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Module)
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
|
NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
|
||||||
|
|
||||||
Module::Module() = default;
|
Module::Module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Module::~Module() = default;
|
Module::~Module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#define XPC_MAP_CLASSNAME Module
|
#define XPC_MAP_CLASSNAME Module
|
||||||
#define XPC_MAP_QUOTED_CLASSNAME "Module"
|
#define XPC_MAP_QUOTED_CLASSNAME "Module"
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
nsString mSearchString;
|
nsString mSearchString;
|
||||||
uint16_t mSearchResult;
|
uint16_t mSearchResult;
|
||||||
private:
|
private:
|
||||||
~nsFileResult() = default;
|
~nsFileResult() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(nsFileResult, nsIAutoCompleteResult)
|
NS_IMPL_ISUPPORTS(nsFileResult, nsIAutoCompleteResult)
|
||||||
|
@ -179,7 +179,7 @@ NS_IMETHODIMP nsFileResult::RemoveValueAt(int32_t rowIndex, bool removeFromDb)
|
||||||
|
|
||||||
class nsFileComplete final : public nsIAutoCompleteSearch
|
class nsFileComplete final : public nsIAutoCompleteSearch
|
||||||
{
|
{
|
||||||
~nsFileComplete() = default;
|
~nsFileComplete() {}
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSIAUTOCOMPLETESEARCH
|
NS_DECL_NSIAUTOCOMPLETESEARCH
|
||||||
|
|
|
@ -22,7 +22,9 @@ nsFindService::nsFindService()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nsFindService::~nsFindService() = default;
|
nsFindService::~nsFindService()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(nsFindService, nsIFindService)
|
NS_IMPL_ISUPPORTS(nsFindService, nsIFindService)
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,13 @@ using namespace mozilla;
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(MozIntl, mozIMozIntl)
|
NS_IMPL_ISUPPORTS(MozIntl, mozIMozIntl)
|
||||||
|
|
||||||
MozIntl::MozIntl() = default;
|
MozIntl::MozIntl()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
MozIntl::~MozIntl() = default;
|
MozIntl::~MozIntl()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
MozIntl::AddGetCalendarInfo(JS::Handle<JS::Value> val, JSContext* cx)
|
MozIntl::AddGetCalendarInfo(JS::Handle<JS::Value> val, JSContext* cx)
|
||||||
|
|
|
@ -741,7 +741,7 @@ public:
|
||||||
, mResult(new TypedArrayResult(TimeStamp::Now()))
|
, mResult(new TypedArrayResult(TimeStamp::Now()))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
~DoReadToTypedArrayEvent() override {
|
~DoReadToTypedArrayEvent() {
|
||||||
// If AbstractReadEvent::Run() has bailed out, we may need to cleanup
|
// If AbstractReadEvent::Run() has bailed out, we may need to cleanup
|
||||||
// mResult, which is main-thread only data
|
// mResult, which is main-thread only data
|
||||||
if (!mResult) {
|
if (!mResult) {
|
||||||
|
@ -778,7 +778,7 @@ public:
|
||||||
, mResult(new StringResult(TimeStamp::Now()))
|
, mResult(new StringResult(TimeStamp::Now()))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
~DoReadToStringEvent() override {
|
~DoReadToStringEvent() {
|
||||||
// If AbstraactReadEvent::Run() has bailed out, we may need to cleanup
|
// If AbstraactReadEvent::Run() has bailed out, we may need to cleanup
|
||||||
// mResult, which is main-thread only data
|
// mResult, which is main-thread only data
|
||||||
if (!mResult) {
|
if (!mResult) {
|
||||||
|
|
|
@ -16,7 +16,9 @@ nsParentalControlsService::nsParentalControlsService() :
|
||||||
mozilla::Unused << mEnabled;
|
mozilla::Unused << mEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsParentalControlsService::~nsParentalControlsService() = default;
|
nsParentalControlsService::~nsParentalControlsService()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
|
nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
|
||||||
|
|
|
@ -25,9 +25,13 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Module)
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
|
NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
|
||||||
|
|
||||||
Module::Module() = default;
|
Module::Module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Module::~Module() = default;
|
Module::~Module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#define XPC_MAP_CLASSNAME Module
|
#define XPC_MAP_CLASSNAME Module
|
||||||
#define XPC_MAP_QUOTED_CLASSNAME "Module"
|
#define XPC_MAP_QUOTED_CLASSNAME "Module"
|
||||||
|
|
|
@ -51,7 +51,7 @@ new_test_uri()
|
||||||
|
|
||||||
class VisitURIObserver final : public nsIObserver
|
class VisitURIObserver final : public nsIObserver
|
||||||
{
|
{
|
||||||
~VisitURIObserver() = default;
|
~VisitURIObserver() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
@ -309,7 +309,7 @@ namespace test_observer_topic_dispatched_helpers {
|
||||||
#define URI_VISITED_RESOLUTION_TOPIC "visited-status-resolution"
|
#define URI_VISITED_RESOLUTION_TOPIC "visited-status-resolution"
|
||||||
class statusObserver final : public nsIObserver
|
class statusObserver final : public nsIObserver
|
||||||
{
|
{
|
||||||
~statusObserver() = default;
|
~statusObserver() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
|
@ -23,9 +23,13 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(Module)
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
|
NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
|
||||||
|
|
||||||
Module::Module() = default;
|
Module::Module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Module::~Module() = default;
|
Module::~Module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#define XPC_MAP_CLASSNAME Module
|
#define XPC_MAP_CLASSNAME Module
|
||||||
#define XPC_MAP_QUOTED_CLASSNAME "Module"
|
#define XPC_MAP_QUOTED_CLASSNAME "Module"
|
||||||
|
|
|
@ -110,7 +110,9 @@ FindExtensionParameterInCommand(const char* aParameterName,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nsXRemoteService::nsXRemoteService() = default;
|
nsXRemoteService::nsXRemoteService()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsXRemoteService::XRemoteBaseStartup(const char *aAppName, const char *aProfileName)
|
nsXRemoteService::XRemoteBaseStartup(const char *aAppName, const char *aProfileName)
|
||||||
|
|
|
@ -179,7 +179,9 @@ CombinedStacks::SizeOfExcludingThis() const {
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
n += mModules.capacity() * sizeof(Telemetry::ProcessedStack::Module);
|
n += mModules.capacity() * sizeof(Telemetry::ProcessedStack::Module);
|
||||||
n += mStacks.capacity() * sizeof(Stack);
|
n += mStacks.capacity() * sizeof(Stack);
|
||||||
for (const auto & s : mStacks) {
|
for (std::vector<Stack>::const_iterator i = mStacks.begin(),
|
||||||
|
e = mStacks.end(); i != e; ++i) {
|
||||||
|
const Stack& s = *i;
|
||||||
n += s.capacity() * sizeof(Telemetry::ProcessedStack::Frame);
|
n += s.capacity() * sizeof(Telemetry::ProcessedStack::Frame);
|
||||||
}
|
}
|
||||||
return n;
|
return n;
|
||||||
|
@ -223,7 +225,7 @@ public:
|
||||||
: mHangIndices(aOther.mHangIndices)
|
: mHangIndices(aOther.mHangIndices)
|
||||||
, mAnnotations(Move(aOther.mAnnotations))
|
, mAnnotations(Move(aOther.mAnnotations))
|
||||||
{}
|
{}
|
||||||
~AnnotationInfo() = default;
|
~AnnotationInfo() {}
|
||||||
AnnotationInfo& operator=(AnnotationInfo&& aOther)
|
AnnotationInfo& operator=(AnnotationInfo&& aOther)
|
||||||
{
|
{
|
||||||
mHangIndices = aOther.mHangIndices;
|
mHangIndices = aOther.mHangIndices;
|
||||||
|
@ -427,7 +429,7 @@ public:
|
||||||
* An implementation of Observe that records statistics of all
|
* An implementation of Observe that records statistics of all
|
||||||
* file IO operations.
|
* file IO operations.
|
||||||
*/
|
*/
|
||||||
void Observe(Observation& aOb) override;
|
void Observe(Observation& aOb);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reflect recorded file IO statistics into Javascript
|
* Reflect recorded file IO statistics into Javascript
|
||||||
|
@ -1426,7 +1428,8 @@ IsValidBreakpadId(const std::string &breakpadId) {
|
||||||
if (breakpadId.size() < 33) {
|
if (breakpadId.size() < 33) {
|
||||||
return false;
|
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')) {
|
if ((c < '0' || c > '9') && (c < 'A' || c > 'F')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1589,11 +1592,13 @@ CreateJSHangAnnotations(JSContext* cx, const HangAnnotationsVector& annotations,
|
||||||
// discard duplicated ones.
|
// discard duplicated ones.
|
||||||
nsTHashtable<nsStringHashKey> reportedAnnotations;
|
nsTHashtable<nsStringHashKey> reportedAnnotations;
|
||||||
size_t annotationIndex = 0;
|
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));
|
JS::RootedObject jsAnnotation(cx, JS_NewPlainObject(cx));
|
||||||
if (!jsAnnotation) {
|
if (!jsAnnotation) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
const HangAnnotationsPtr& curAnnotations = *i;
|
||||||
// Build a key to index the current annotations in our hash set.
|
// Build a key to index the current annotations in our hash set.
|
||||||
nsAutoString annotationsKey;
|
nsAutoString annotationsKey;
|
||||||
nsresult rv = ComputeAnnotationsKey(curAnnotations, annotationsKey);
|
nsresult rv = ComputeAnnotationsKey(curAnnotations, annotationsKey);
|
||||||
|
@ -1728,9 +1733,9 @@ TelemetryImpl::GetThreadHangStats(JSContext* cx, JS::MutableHandle<JS::Value> re
|
||||||
|
|
||||||
// Add saved threads next
|
// Add saved threads next
|
||||||
MutexAutoLock autoLock(mThreadHangStatsMutex);
|
MutexAutoLock autoLock(mThreadHangStatsMutex);
|
||||||
for (auto & stat : mThreadHangStats) {
|
for (size_t i = 0; i < mThreadHangStats.length(); i++) {
|
||||||
JS::RootedObject obj(cx,
|
JS::RootedObject obj(cx,
|
||||||
CreateJSThreadHangStats(cx, stat));
|
CreateJSThreadHangStats(cx, mThreadHangStats[i]));
|
||||||
if (!JS_DefineElement(cx, retObj, threadIndex++, obj, JSPROP_ENUMERATE)) {
|
if (!JS_DefineElement(cx, retObj, threadIndex++, obj, JSPROP_ENUMERATE)) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -2566,7 +2571,9 @@ RecordShutdownEndTimeStamp() {
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace Telemetry {
|
namespace Telemetry {
|
||||||
|
|
||||||
ProcessedStack::ProcessedStack() = default;
|
ProcessedStack::ProcessedStack()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
size_t ProcessedStack::GetStackSize() const
|
size_t ProcessedStack::GetStackSize() const
|
||||||
{
|
{
|
||||||
|
@ -2678,7 +2685,9 @@ GetStackAndModules(const std::vector<uintptr_t>& aPCs)
|
||||||
|
|
||||||
// Copy the information to the return value.
|
// Copy the information to the return value.
|
||||||
ProcessedStack Ret;
|
ProcessedStack Ret;
|
||||||
for (auto & rawFrame : rawStack) {
|
for (std::vector<StackFrame>::iterator i = rawStack.begin(),
|
||||||
|
e = rawStack.end(); i != e; ++i) {
|
||||||
|
const StackFrame &rawFrame = *i;
|
||||||
mozilla::Telemetry::ProcessedStack::Frame frame = { rawFrame.mPC, rawFrame.mModIndex };
|
mozilla::Telemetry::ProcessedStack::Frame frame = { rawFrame.mPC, rawFrame.mModIndex };
|
||||||
Ret.AddFrame(frame);
|
Ret.AddFrame(frame);
|
||||||
}
|
}
|
||||||
|
@ -2748,10 +2757,10 @@ HangStack::AppendViaBuffer(const char* aText, size_t aLength)
|
||||||
|
|
||||||
if (prevStart != mBuffer.begin()) {
|
if (prevStart != mBuffer.begin()) {
|
||||||
// The buffer has moved; we have to adjust pointers in the stack.
|
// The buffer has moved; we have to adjust pointers in the stack.
|
||||||
for (auto & entry : *this) {
|
for (const char** entry = this->begin(); entry != this->end(); entry++) {
|
||||||
if (entry >= prevStart && entry < prevEnd) {
|
if (*entry >= prevStart && *entry < prevEnd) {
|
||||||
// Move from old buffer to new buffer.
|
// Move from old buffer to new buffer.
|
||||||
entry += mBuffer.begin() - prevStart;
|
*entry += mBuffer.begin() - prevStart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,8 @@ internal_GetRegisteredHistogramIds(bool keyed, uint32_t dataset,
|
||||||
{
|
{
|
||||||
nsTArray<char*> collection;
|
nsTArray<char*> 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()) ||
|
if (IsExpiredVersion(h.expiration()) ||
|
||||||
h.keyed != keyed ||
|
h.keyed != keyed ||
|
||||||
!IsInDataset(h.dataset, dataset)) {
|
!IsInDataset(h.dataset, dataset)) {
|
||||||
|
@ -750,7 +751,9 @@ void internal_Accumulate(mozilla::Telemetry::ID aHistogram, uint32_t aSample);
|
||||||
void
|
void
|
||||||
internal_IdentifyCorruptHistograms(StatisticsRecorder::Histograms &hs)
|
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;
|
mozilla::Telemetry::ID id;
|
||||||
nsresult rv = internal_GetHistogramEnumId(h->histogram_name().c_str(), &id);
|
nsresult rv = internal_GetHistogramEnumId(h->histogram_name().c_str(), &id);
|
||||||
// This histogram isn't a static histogram, just ignore it.
|
// This histogram isn't a static histogram, just ignore it.
|
||||||
|
@ -2061,7 +2064,8 @@ void TelemetryHistogram::InitializeGlobalState(bool canRecordBase,
|
||||||
mozilla::PodArrayZero(gCorruptHistograms);
|
mozilla::PodArrayZero(gCorruptHistograms);
|
||||||
|
|
||||||
// Create registered keyed histograms
|
// 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) {
|
if (!h.keyed) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2161,8 +2165,9 @@ void
|
||||||
TelemetryHistogram::InitHistogramRecordingEnabled()
|
TelemetryHistogram::InitHistogramRecordingEnabled()
|
||||||
{
|
{
|
||||||
StaticMutexAutoLock locker(gTelemetryHistogramMutex);
|
StaticMutexAutoLock locker(gTelemetryHistogramMutex);
|
||||||
for (auto recordingInitiallyDisabledID : kRecordingInitiallyDisabledIDs) {
|
const size_t length = mozilla::ArrayLength(kRecordingInitiallyDisabledIDs);
|
||||||
internal_SetHistogramRecordingEnabled(recordingInitiallyDisabledID,
|
for (size_t i = 0; i < length; i++) {
|
||||||
|
internal_SetHistogramRecordingEnabled(kRecordingInitiallyDisabledIDs[i],
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2397,7 +2402,8 @@ TelemetryHistogram::CreateHistogramSnapshots(JSContext *cx,
|
||||||
|
|
||||||
// OK, now we can actually reflect things.
|
// OK, now we can actually reflect things.
|
||||||
JS::Rooted<JSObject*> hobj(cx);
|
JS::Rooted<JSObject*> 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) ||
|
if (!internal_ShouldReflectHistogram(h) || internal_IsEmpty(h) ||
|
||||||
internal_IsExpired(h)) {
|
internal_IsExpired(h)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -2637,7 +2643,8 @@ TelemetryHistogram::GetHistogramSizesofIncludingThis(mozilla::MallocSizeOf
|
||||||
StatisticsRecorder::Histograms hs;
|
StatisticsRecorder::Histograms hs;
|
||||||
StatisticsRecorder::GetHistograms(&hs);
|
StatisticsRecorder::GetHistograms(&hs);
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
for (auto h : hs) {
|
for (HistogramIterator it = hs.begin(); it != hs.end(); ++it) {
|
||||||
|
Histogram *h = *it;
|
||||||
n += h->SizeOfIncludingThis(aMallocSizeOf);
|
n += h->SizeOfIncludingThis(aMallocSizeOf);
|
||||||
}
|
}
|
||||||
return n;
|
return n;
|
||||||
|
|
|
@ -154,7 +154,7 @@ ScalarInfo::expiration() const
|
||||||
class ScalarBase
|
class ScalarBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~ScalarBase() = default;
|
virtual ~ScalarBase() {};
|
||||||
|
|
||||||
// Set, Add and SetMaximum functions as described in the Telemetry IDL.
|
// Set, Add and SetMaximum functions as described in the Telemetry IDL.
|
||||||
virtual ScalarResult SetValue(nsIVariant* aValue) = 0;
|
virtual ScalarResult SetValue(nsIVariant* aValue) = 0;
|
||||||
|
@ -194,7 +194,7 @@ public:
|
||||||
using ScalarBase::SetValue;
|
using ScalarBase::SetValue;
|
||||||
|
|
||||||
ScalarUnsigned() : mStorage(0) {};
|
ScalarUnsigned() : mStorage(0) {};
|
||||||
~ScalarUnsigned() override = default;
|
~ScalarUnsigned() {};
|
||||||
|
|
||||||
ScalarResult SetValue(nsIVariant* aValue) final;
|
ScalarResult SetValue(nsIVariant* aValue) final;
|
||||||
void SetValue(uint32_t aValue) final;
|
void SetValue(uint32_t aValue) final;
|
||||||
|
@ -334,7 +334,7 @@ public:
|
||||||
using ScalarBase::SetValue;
|
using ScalarBase::SetValue;
|
||||||
|
|
||||||
ScalarString() : mStorage(EmptyString()) {};
|
ScalarString() : mStorage(EmptyString()) {};
|
||||||
~ScalarString() override = default;
|
~ScalarString() {};
|
||||||
|
|
||||||
ScalarResult SetValue(nsIVariant* aValue) final;
|
ScalarResult SetValue(nsIVariant* aValue) final;
|
||||||
ScalarResult SetValue(const nsAString& aValue) final;
|
ScalarResult SetValue(const nsAString& aValue) final;
|
||||||
|
@ -415,7 +415,7 @@ public:
|
||||||
using ScalarBase::SetValue;
|
using ScalarBase::SetValue;
|
||||||
|
|
||||||
ScalarBoolean() : mStorage(false) {};
|
ScalarBoolean() : mStorage(false) {};
|
||||||
~ScalarBoolean() override = default;
|
~ScalarBoolean() {};
|
||||||
|
|
||||||
ScalarResult SetValue(nsIVariant* aValue) final;
|
ScalarResult SetValue(nsIVariant* aValue) final;
|
||||||
void SetValue(bool aValue) final;
|
void SetValue(bool aValue) final;
|
||||||
|
@ -514,7 +514,7 @@ public:
|
||||||
typedef mozilla::Pair<nsCString, nsCOMPtr<nsIVariant>> KeyValuePair;
|
typedef mozilla::Pair<nsCString, nsCOMPtr<nsIVariant>> KeyValuePair;
|
||||||
|
|
||||||
explicit KeyedScalar(uint32_t aScalarKind) : mScalarKind(aScalarKind) {};
|
explicit KeyedScalar(uint32_t aScalarKind) : mScalarKind(aScalarKind) {};
|
||||||
~KeyedScalar() = default;
|
~KeyedScalar() {};
|
||||||
|
|
||||||
// Set, Add and SetMaximum functions as described in the Telemetry IDL.
|
// Set, Add and SetMaximum functions as described in the Telemetry IDL.
|
||||||
// These methods implicitly instantiate a Scalar[*] for each key.
|
// These methods implicitly instantiate a Scalar[*] for each key.
|
||||||
|
|
|
@ -173,9 +173,10 @@ RunWatchdog(void* arg)
|
||||||
class PR_CloseDelete
|
class PR_CloseDelete
|
||||||
{
|
{
|
||||||
public:
|
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
|
void operator()(PRFileDesc* aPtr) const
|
||||||
{
|
{
|
||||||
|
@ -341,8 +342,8 @@ nsTerminator::SelfInit()
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto & shutdownStep : sShutdownSteps) {
|
for (size_t i = 0; i < ArrayLength(sShutdownSteps); ++i) {
|
||||||
DebugOnly<nsresult> rv = os->AddObserver(this, shutdownStep.mTopic, false);
|
DebugOnly<nsresult> rv = os->AddObserver(this, sShutdownSteps[i].mTopic, false);
|
||||||
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "AddObserver failed");
|
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "AddObserver failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,18 +507,18 @@ nsTerminator::UpdateTelemetry()
|
||||||
UniquePtr<nsCString> telemetryData(new nsCString());
|
UniquePtr<nsCString> telemetryData(new nsCString());
|
||||||
telemetryData->AppendLiteral("{");
|
telemetryData->AppendLiteral("{");
|
||||||
size_t fields = 0;
|
size_t fields = 0;
|
||||||
for (auto & shutdownStep : sShutdownSteps) {
|
for (size_t i = 0; i < ArrayLength(sShutdownSteps); ++i) {
|
||||||
if (shutdownStep.mTicks < 0) {
|
if (sShutdownSteps[i].mTicks < 0) {
|
||||||
// Ignore this field.
|
// Ignore this field.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (fields++ > 0) {
|
if (fields++ > 0) {
|
||||||
telemetryData->Append(", ");
|
telemetryData->Append(", ");
|
||||||
}
|
}
|
||||||
telemetryData->AppendInt(shutdownStep.mTicks);
|
telemetryData->AppendLiteral("\"");
|
||||||
telemetryData->AppendLiteral(R"(")");
|
telemetryData->Append(sShutdownSteps[i].mTopic);
|
||||||
telemetryData->Append(shutdownStep.mTopic);
|
telemetryData->AppendLiteral("\": ");
|
||||||
telemetryData->AppendLiteral(R"(": )");
|
telemetryData->AppendInt(sShutdownSteps[i].mTicks);
|
||||||
}
|
}
|
||||||
telemetryData->AppendLiteral("}");
|
telemetryData->AppendLiteral("}");
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,8 @@ HashStore::HashStore(const nsACString& aTableName,
|
||||||
}
|
}
|
||||||
|
|
||||||
HashStore::~HashStore()
|
HashStore::~HashStore()
|
||||||
= default;
|
{
|
||||||
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
HashStore::Reset()
|
HashStore::Reset()
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
KeyPair(SECKEYPrivateKey* aPrivateKey, SECKEYPublicKey* aPublicKey);
|
KeyPair(SECKEYPrivateKey* aPrivateKey, SECKEYPublicKey* aPublicKey);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~KeyPair() override
|
~KeyPair()
|
||||||
{
|
{
|
||||||
nsNSSShutDownPreventionLock locker;
|
nsNSSShutDownPreventionLock locker;
|
||||||
if (isAlreadyShutDown()) {
|
if (isAlreadyShutDown()) {
|
||||||
|
@ -96,7 +96,7 @@ public:
|
||||||
KeyGenRunnable(KeyType keyType, nsIIdentityKeyGenCallback * aCallback);
|
KeyGenRunnable(KeyType keyType, nsIIdentityKeyGenCallback * aCallback);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~KeyGenRunnable() override
|
~KeyGenRunnable()
|
||||||
{
|
{
|
||||||
nsNSSShutDownPreventionLock locker;
|
nsNSSShutDownPreventionLock locker;
|
||||||
if (isAlreadyShutDown()) {
|
if (isAlreadyShutDown()) {
|
||||||
|
@ -106,7 +106,7 @@ private:
|
||||||
shutdown(ShutdownCalledFrom::Object);
|
shutdown(ShutdownCalledFrom::Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
void virtualDestroyNSSReference() override
|
virtual void virtualDestroyNSSReference() override
|
||||||
{
|
{
|
||||||
destructorSafeDestroyNSSReference();
|
destructorSafeDestroyNSSReference();
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ public:
|
||||||
nsIIdentitySignCallback * aCallback);
|
nsIIdentitySignCallback * aCallback);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~SignRunnable() override
|
~SignRunnable()
|
||||||
{
|
{
|
||||||
nsNSSShutDownPreventionLock locker;
|
nsNSSShutDownPreventionLock locker;
|
||||||
if (isAlreadyShutDown()) {
|
if (isAlreadyShutDown()) {
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
NS_DECL_NSIIDENTITYCRYPTOSERVICE
|
NS_DECL_NSIIDENTITYCRYPTOSERVICE
|
||||||
|
|
||||||
IdentityCryptoService() = default;
|
IdentityCryptoService() { }
|
||||||
nsresult Init()
|
nsresult Init()
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
@ -183,7 +183,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~IdentityCryptoService() = default;
|
~IdentityCryptoService() { }
|
||||||
IdentityCryptoService(const KeyPair &) = delete;
|
IdentityCryptoService(const KeyPair &) = delete;
|
||||||
void operator=(const IdentityCryptoService &) = delete;
|
void operator=(const IdentityCryptoService &) = delete;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1086,7 +1086,7 @@ class Action
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Action() : mProgressCost(1), mNext(nullptr) { }
|
Action() : mProgressCost(1), mNext(nullptr) { }
|
||||||
virtual ~Action() = default;
|
virtual ~Action() { }
|
||||||
|
|
||||||
virtual int Parse(NS_tchar *line) = 0;
|
virtual int Parse(NS_tchar *line) = 0;
|
||||||
|
|
||||||
|
@ -1115,10 +1115,10 @@ class RemoveFile : public Action
|
||||||
public:
|
public:
|
||||||
RemoveFile() : mSkip(0) { }
|
RemoveFile() : mSkip(0) { }
|
||||||
|
|
||||||
int Parse(NS_tchar *line) override;
|
int Parse(NS_tchar *line);
|
||||||
int Prepare() override;
|
int Prepare();
|
||||||
int Execute() override;
|
int Execute();
|
||||||
void Finish(int status) override;
|
void Finish(int status);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mozilla::UniquePtr<NS_tchar[]> mFile;
|
mozilla::UniquePtr<NS_tchar[]> mFile;
|
||||||
|
@ -1246,10 +1246,10 @@ class RemoveDir : public Action
|
||||||
public:
|
public:
|
||||||
RemoveDir() : mSkip(0) { }
|
RemoveDir() : mSkip(0) { }
|
||||||
|
|
||||||
int Parse(NS_tchar *line) override;
|
virtual int Parse(NS_tchar *line);
|
||||||
int Prepare() override; // check that the source dir exists
|
virtual int Prepare(); // check that the source dir exists
|
||||||
int Execute() override;
|
virtual int Execute();
|
||||||
void Finish(int status) override;
|
virtual void Finish(int status);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mozilla::UniquePtr<NS_tchar[]> mDir;
|
mozilla::UniquePtr<NS_tchar[]> mDir;
|
||||||
|
@ -1363,10 +1363,10 @@ class AddFile : public Action
|
||||||
public:
|
public:
|
||||||
AddFile() : mAdded(false) { }
|
AddFile() : mAdded(false) { }
|
||||||
|
|
||||||
int Parse(NS_tchar *line) override;
|
virtual int Parse(NS_tchar *line);
|
||||||
int Prepare() override;
|
virtual int Prepare();
|
||||||
int Execute() override;
|
virtual int Execute();
|
||||||
void Finish(int status) override;
|
virtual void Finish(int status);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mozilla::UniquePtr<NS_tchar[]> mFile;
|
mozilla::UniquePtr<NS_tchar[]> mFile;
|
||||||
|
@ -1466,12 +1466,12 @@ class PatchFile : public Action
|
||||||
public:
|
public:
|
||||||
PatchFile() : mPatchFile(nullptr), mPatchIndex(-1), buf(nullptr) { }
|
PatchFile() : mPatchFile(nullptr), mPatchIndex(-1), buf(nullptr) { }
|
||||||
|
|
||||||
~PatchFile() override;
|
virtual ~PatchFile();
|
||||||
|
|
||||||
int Parse(NS_tchar *line) override;
|
virtual int Parse(NS_tchar *line);
|
||||||
int Prepare() override; // should check for patch file and for checksum here
|
virtual int Prepare(); // should check for patch file and for checksum here
|
||||||
int Execute() override;
|
virtual int Execute();
|
||||||
void Finish(int status) override;
|
virtual void Finish(int status);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int LoadSourceFile(FILE* ofile);
|
int LoadSourceFile(FILE* ofile);
|
||||||
|
@ -1787,10 +1787,10 @@ PatchFile::Finish(int status)
|
||||||
class AddIfFile : public AddFile
|
class AddIfFile : public AddFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int Parse(NS_tchar *line) override;
|
virtual int Parse(NS_tchar *line);
|
||||||
int Prepare() override;
|
virtual int Prepare();
|
||||||
int Execute() override;
|
virtual int Execute();
|
||||||
void Finish(int status) override;
|
virtual void Finish(int status);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
||||||
|
@ -1848,10 +1848,10 @@ AddIfFile::Finish(int status)
|
||||||
class AddIfNotFile : public AddFile
|
class AddIfNotFile : public AddFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int Parse(NS_tchar *line) override;
|
virtual int Parse(NS_tchar *line);
|
||||||
int Prepare() override;
|
virtual int Prepare();
|
||||||
int Execute() override;
|
virtual int Execute();
|
||||||
void Finish(int status) override;
|
virtual void Finish(int status);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
||||||
|
@ -1909,10 +1909,10 @@ AddIfNotFile::Finish(int status)
|
||||||
class PatchIfFile : public PatchFile
|
class PatchIfFile : public PatchFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int Parse(NS_tchar *line) override;
|
virtual int Parse(NS_tchar *line);
|
||||||
int Prepare() override; // should check for patch file and for checksum here
|
virtual int Prepare(); // should check for patch file and for checksum here
|
||||||
int Execute() override;
|
virtual int Execute();
|
||||||
void Finish(int status) override;
|
virtual void Finish(int status);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
mozilla::UniquePtr<NS_tchar[]> mTestFile;
|
||||||
|
|
|
@ -82,10 +82,10 @@ nsGConfService::Init()
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto GConfSymbol : kGConfSymbols) {
|
for (uint32_t i = 0; i < ArrayLength(kGConfSymbols); i++) {
|
||||||
*GConfSymbol.function =
|
*kGConfSymbols[i].function =
|
||||||
PR_FindFunctionSymbol(gconfLib, GConfSymbol.functionName);
|
PR_FindFunctionSymbol(gconfLib, kGConfSymbols[i].functionName);
|
||||||
if (!*GConfSymbol.function) {
|
if (!*kGConfSymbols[i].function) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ nsGIOMimeApp::Launch(const nsACString& aUri)
|
||||||
|
|
||||||
class GIOUTF8StringEnumerator final : public nsIUTF8StringEnumerator
|
class GIOUTF8StringEnumerator final : public nsIUTF8StringEnumerator
|
||||||
{
|
{
|
||||||
~GIOUTF8StringEnumerator() = default;
|
~GIOUTF8StringEnumerator() { }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GIOUTF8StringEnumerator() : mIndex(0) { }
|
GIOUTF8StringEnumerator() : mIndex(0) { }
|
||||||
|
|
|
@ -308,10 +308,10 @@ nsGSettingsService::Init()
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto GSettingsSymbol : kGSettingsSymbols) {
|
for (uint32_t i = 0; i < ArrayLength(kGSettingsSymbols); i++) {
|
||||||
*GSettingsSymbol.function =
|
*kGSettingsSymbols[i].function =
|
||||||
PR_FindFunctionSymbol(gioLib, GSettingsSymbol.functionName);
|
PR_FindFunctionSymbol(gioLib, kGSettingsSymbols[i].functionName);
|
||||||
if (!*GSettingsSymbol.function) {
|
if (!*kGSettingsSymbols[i].function) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,10 +93,10 @@ nsPackageKitService::Init()
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto GDBusSymbol : kGDBusSymbols) {
|
for (uint32_t i = 0; i < ArrayLength(kGDBusSymbols); i++) {
|
||||||
*GDBusSymbol.function =
|
*kGDBusSymbols[i].function =
|
||||||
PR_FindFunctionSymbol(gioLib, GDBusSymbol.functionName);
|
PR_FindFunctionSymbol(gioLib, kGDBusSymbols[i].functionName);
|
||||||
if (!*GDBusSymbol.function) {
|
if (!*kGDBusSymbols[i].function) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,11 @@ NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService)
|
||||||
NS_INTERFACE_MAP_END_THREADSAFE
|
NS_INTERFACE_MAP_END_THREADSAFE
|
||||||
|
|
||||||
nsSystemAlertsService::nsSystemAlertsService()
|
nsSystemAlertsService::nsSystemAlertsService()
|
||||||
= default;
|
{
|
||||||
|
}
|
||||||
|
|
||||||
nsSystemAlertsService::~nsSystemAlertsService()
|
nsSystemAlertsService::~nsSystemAlertsService()
|
||||||
= default;
|
{}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSystemAlertsService::Init()
|
nsSystemAlertsService::Init()
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
nsresult Init();
|
nsresult Init();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~nsUnixSystemProxySettings() = default;
|
~nsUnixSystemProxySettings() {}
|
||||||
|
|
||||||
nsCOMPtr<nsIGConfService> mGConf;
|
nsCOMPtr<nsIGConfService> mGConf;
|
||||||
nsCOMPtr<nsIGSettingsService> mGSettings;
|
nsCOMPtr<nsIGSettingsService> mGSettings;
|
||||||
|
|
|
@ -2748,18 +2748,18 @@ static struct SavedVar {
|
||||||
|
|
||||||
static void SaveStateForAppInitiatedRestart()
|
static void SaveStateForAppInitiatedRestart()
|
||||||
{
|
{
|
||||||
for (auto & savedVar : gSavedVars) {
|
for (size_t i = 0; i < ArrayLength(gSavedVars); ++i) {
|
||||||
const char *s = PR_GetEnv(savedVar.name);
|
const char *s = PR_GetEnv(gSavedVars[i].name);
|
||||||
if (s)
|
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()
|
static void RestoreStateForAppInitiatedRestart()
|
||||||
{
|
{
|
||||||
for (auto & savedVar : gSavedVars) {
|
for (size_t i = 0; i < ArrayLength(gSavedVars); ++i) {
|
||||||
if (savedVar.value)
|
if (gSavedVars[i].value)
|
||||||
PR_SetEnv(savedVar.value);
|
PR_SetEnv(gSavedVars[i].value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче