--- a/js/ductwork/debugger/JSDebugger.cpp
+++ b/js/ductwork/debugger/JSDebugger.cpp
@@ -26,17 +26,18 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(JSDebugge
NS_IMPL_ISUPPORTS(JSDebugger, IJSDebugger)
JSDebugger::JSDebugger()
{
}
JSDebugger::~JSDebugger()
-= default;
+{
+}
NS_IMETHODIMP
JSDebugger::AddClass(JS::Handle<JS::Value> global, JSContext* cx)
{
nsresult rv;
nsCOMPtr<nsIXPConnect> xpc = do_GetService(nsIXPConnect::GetCID(), &rv);
if (!global.isObject()) {
--- a/js/src/asmjs/WasmTypes.h
+++ b/js/src/asmjs/WasmTypes.h
@@ -729,17 +729,17 @@ class CallSiteDesc
{
uint32_t lineOrBytecode_ : 31;
uint32_t kind_ : 1;
public:
enum Kind {
Relative, // pc-relative call
Register // call *register
};
- CallSiteDesc() = default;
+ CallSiteDesc() {}
explicit CallSiteDesc(Kind kind)
: lineOrBytecode_(0), kind_(kind)
{}
CallSiteDesc(uint32_t lineOrBytecode, Kind kind)
: lineOrBytecode_(lineOrBytecode), kind_(kind)
{
MOZ_ASSERT(lineOrBytecode_ == lineOrBytecode, "must fit in 31 bits");
}
--- a/js/src/ds/InlineTable.h
+++ b/js/src/ds/InlineTable.h
@@ -196,17 +196,17 @@ class InlineTable
explicit AddPtr(const TableAddPtr& p)
: entry_(p.found() ? &*p : nullptr),
tableAddPtr_(p),
isInlinePtr_(false)
{ }
public:
- AddPtr() = default;
+ AddPtr() {}
bool found() const {
return isInlinePtr_ ? inlPtrFound_ : tableAddPtr_.found();
}
explicit operator bool() const {
return found();
}
--- a/js/src/frontend/NameAnalysisTypes.h
+++ b/js/src/frontend/NameAnalysisTypes.h
@@ -31,17 +31,17 @@ class EnvironmentCoordinate
public:
explicit inline EnvironmentCoordinate(jsbytecode* pc)
: hops_(GET_ENVCOORD_HOPS(pc)), slot_(GET_ENVCOORD_SLOT(pc + ENVCOORD_HOPS_LEN))
{
MOZ_ASSERT(JOF_OPTYPE(JSOp(*pc)) == JOF_ENVCOORD);
}
- EnvironmentCoordinate() = default;
+ EnvironmentCoordinate() {}
void setHops(uint32_t hops) {
MOZ_ASSERT(hops < ENVCOORD_HOPS_LIMIT);
hops_ = hops;
}
void setSlot(uint32_t slot) {
MOZ_ASSERT(slot < ENVCOORD_SLOT_LIMIT);
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -31,17 +31,17 @@ struct KeywordInfo;
namespace js {
namespace frontend {
struct TokenPos {
uint32_t begin; // Offset of the token's first char.
uint32_t end; // Offset of 1 past the token's last char.
- TokenPos() = default;
+ TokenPos() {}
TokenPos(uint32_t begin, uint32_t end) : begin(begin), end(end) {}
// Return a TokenPos that covers left, right, and anything in between.
static TokenPos box(const TokenPos& left, const TokenPos& right) {
MOZ_ASSERT(left.begin <= left.end);
MOZ_ASSERT(left.end <= right.begin);
MOZ_ASSERT(right.begin <= right.end);
return TokenPos(left.begin, right.end);
--- a/js/src/gc/FindSCCs.h
+++ b/js/src/gc/FindSCCs.h
@@ -24,17 +24,17 @@ struct GraphNodeBase
unsigned gcLowLink;
GraphNodeBase()
: gcNextGraphNode(nullptr),
gcNextGraphComponent(nullptr),
gcDiscoveryTime(0),
gcLowLink(0) {}
- ~GraphNodeBase() = default;
+ ~GraphNodeBase() {}
Node* nextNodeInGroup() const {
if (gcNextGraphNode && gcNextGraphNode->gcNextGraphComponent == gcNextGraphComponent)
return gcNextGraphNode;
return nullptr;
}
Node* nextGroup() const {
--- a/js/src/gc/Heap.h
+++ b/js/src/gc/Heap.h
@@ -861,17 +861,17 @@ static_assert(ArenasPerChunk == 252, "Do
#endif
/* A chunk bitmap contains enough mark bits for all the cells in a chunk. */
struct ChunkBitmap
{
volatile uintptr_t bitmap[ArenaBitmapWords * ArenasPerChunk];
public:
- ChunkBitmap() = default;
+ ChunkBitmap() { }
MOZ_ALWAYS_INLINE void getMarkWordAndMask(const Cell* cell, uint32_t color,
uintptr_t** wordp, uintptr_t* maskp)
{
detail::GetGCThingMarkWordAndMask(uintptr_t(cell), color, wordp, maskp);
}
MOZ_ALWAYS_INLINE MOZ_TSAN_BLACKLIST bool isMarked(const Cell* cell, uint32_t color) {
--- a/js/src/irregexp/RegExpAST.h
+++ b/js/src/irregexp/RegExpAST.h
@@ -45,28 +45,28 @@ namespace js {
namespace irregexp {
class RegExpCompiler;
class RegExpNode;
class RegExpVisitor
{
public:
- virtual ~RegExpVisitor() = default;
+ virtual ~RegExpVisitor() { }
#define MAKE_CASE(Name) \
virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
#undef MAKE_CASE
};
class RegExpTree
{
public:
static const int kInfinity = INT32_MAX;
- virtual ~RegExpTree() = default;
+ virtual ~RegExpTree() {}
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) = 0;
virtual bool IsTextElement() { return false; }
virtual bool IsAnchoredAtStart() { return false; }
virtual bool IsAnchoredAtEnd() { return false; }
virtual int min_match() = 0;
virtual int max_match() = 0;
// Returns the interval of registers used for captures within this
--- a/js/src/irregexp/RegExpEngine.h
+++ b/js/src/irregexp/RegExpEngine.h
@@ -485,17 +485,17 @@ class QuickCheckDetails
// E.g., if it requires to be at the start of the input, and isn't.
bool cannot_match_;
};
class RegExpNode
{
public:
explicit RegExpNode(LifoAlloc* alloc);
- virtual ~RegExpNode() = default;
+ virtual ~RegExpNode() {}
virtual void Accept(NodeVisitor* visitor) = 0;
// Generates a goto to this node or actually generates the code at this point.
virtual void Emit(RegExpCompiler* compiler, Trace* trace) = 0;
// How many characters must this node consume at a minimum in order to
// succeed. If we have found at least 'still_to_find' characters that
// must be consumed there is no need to ask any following nodes whether
@@ -1476,17 +1476,17 @@ class Trace
QuickCheckDetails quick_check_performed_;
int flush_budget_;
TriBool at_start_;
};
class NodeVisitor
{
public:
- virtual ~NodeVisitor() = default;
+ virtual ~NodeVisitor() { }
#define DECLARE_VISIT(Type) \
virtual void Visit##Type(Type##Node* that) = 0;
FOR_EACH_NODE_TYPE(DECLARE_VISIT)
#undef DECLARE_VISIT
virtual void VisitLoopChoice(LoopChoiceNode* that) { VisitChoice(that); }
};
// Assertion propagation moves information about assertions such as
--- a/js/src/jit/InlineList.h
+++ b/js/src/jit/InlineList.h
@@ -594,17 +594,17 @@ template <typename T>
class InlineSpaghettiStack : protected InlineSpaghettiStackNode<T>
{
friend class InlineSpaghettiStackIterator<T>;
typedef InlineSpaghettiStackNode<T> Node;
public:
InlineSpaghettiStack()
- = default;
+ { }
public:
typedef InlineSpaghettiStackIterator<T> iterator;
public:
iterator begin() const {
return iterator(this);
}
--- a/js/src/jit/IonOptimizationLevels.h
+++ b/js/src/jit/IonOptimizationLevels.h
@@ -146,17 +146,17 @@ class OptimizationInfo
double inliningWarmUpThresholdFactor_;
// How many invocations or loop iterations are needed before a function
// is hot enough to recompile the outerScript to inline that function,
// as a multiplication of inliningWarmUpThreshold.
uint32_t inliningRecompileThresholdFactor_;
OptimizationInfo()
- = default;
+ { }
void initNormalOptimizationInfo();
void initAsmjsOptimizationInfo();
OptimizationLevel level() const {
return level_;
}
--- a/js/src/jit/JitFrames.h
+++ b/js/src/jit/JitFrames.h
@@ -226,17 +226,17 @@ class FrameSizeClass
{
uint32_t class_;
explicit FrameSizeClass(uint32_t class_) : class_(class_)
{ }
public:
FrameSizeClass()
- = default;
+ { }
static FrameSizeClass None() {
return FrameSizeClass(NO_FRAME_SIZE_CLASS_ID);
}
static FrameSizeClass FromClass(uint32_t class_) {
return FrameSizeClass(class_);
}
--- a/js/src/jit/JitSpewer.h
+++ b/js/src/jit/JitSpewer.h
@@ -203,31 +203,31 @@ class GraphSpewer
static inline void SpewBeginFunction(MIRGenerator* mir, JSScript* function)
{ }
class AutoSpewEndFunction
{
public:
explicit AutoSpewEndFunction(MIRGenerator* mir) { }
- ~AutoSpewEndFunction() = default;
+ ~AutoSpewEndFunction() { }
};
static inline void CheckLogging()
{ }
static inline Fprinter& JitSpewPrinter()
{
MOZ_CRASH("No empty backend for JitSpewPrinter");
}
class JitSpewIndent
{
public:
explicit JitSpewIndent(JitSpewChannel channel) {}
- ~JitSpewIndent() = default;
+ ~JitSpewIndent() {}
};
// The computation of some of the argument of the spewing functions might be
// costly, thus we use variaidic macros to ignore any argument of these
// functions.
static inline void JitSpewCheckArguments(JitSpewChannel channel, const char* fmt)
{ }
--- a/js/src/jit/LIR.h
+++ b/js/src/jit/LIR.h
@@ -1360,17 +1360,17 @@ class LSnapshot : public TempObject
struct SafepointSlotEntry {
// Flag indicating whether this is a slot in the stack or argument space.
uint32_t stack:1;
// Byte offset of the slot, as in LStackSlot or LArgument.
uint32_t slot:31;
- SafepointSlotEntry() = default;
+ SafepointSlotEntry() { }
SafepointSlotEntry(bool stack, uint32_t slot)
: stack(stack), slot(slot)
{ }
explicit SafepointSlotEntry(const LAllocation* a)
: stack(a->isStackSlot()), slot(a->memorySlot())
{ }
};
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -1186,17 +1186,17 @@ class MAryInstruction : public MInstruct
MOZ_ASSERT(u >= &operands_[0]);
MOZ_ASSERT(u <= &operands_[numOperands() - 1]);
return u - &operands_[0];
}
void replaceOperand(size_t index, MDefinition* operand) final override {
operands_[index].replaceProducer(operand);
}
- MAryInstruction() = default;
+ MAryInstruction() { }
explicit MAryInstruction(const MAryInstruction<Arity>& other)
: MInstruction(other)
{
for (int i = 0; i < (int) Arity; i++) // N.B. use |int| to avoid warnings when Arity == 0
operands_[i].init(other.operands_[i].producer(), this);
}
};
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -1751,17 +1751,17 @@ class MacroAssembler : public MacroAssem
// is used by callWithABI, and callJit functions, except if suffixed by
// NoProfiler.
class AutoProfilerCallInstrumentation {
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER;
public:
explicit AutoProfilerCallInstrumentation(MacroAssembler& masm
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
- ~AutoProfilerCallInstrumentation() = default;
+ ~AutoProfilerCallInstrumentation() {}
};
friend class AutoProfilerCallInstrumentation;
void appendProfilerCallSite(CodeOffset label) {
propagateOOM(profilerCallSites_.append(label));
}
// Fix up the code pointers to be written for locations where profilerCallSite
--- a/js/src/jit/MoveResolver.h
+++ b/js/src/jit/MoveResolver.h
@@ -41,17 +41,17 @@ class MoveOperand
private:
Kind kind_;
uint32_t code_;
int32_t disp_;
public:
MoveOperand()
- = default;
+ { }
explicit MoveOperand(Register reg) : kind_(REG), code_(reg.code())
{ }
explicit MoveOperand(FloatRegister reg) : kind_(FLOAT_REG), code_(reg.code())
{ }
MoveOperand(Register reg, int32_t disp, Kind kind = MEMORY)
: kind_(kind),
code_(reg.code()),
disp_(disp)
@@ -59,17 +59,20 @@ class MoveOperand
MOZ_ASSERT(isMemoryOrEffectiveAddress());
// With a zero offset, this is a plain reg-to-reg move.
if (disp == 0 && kind_ == EFFECTIVE_ADDRESS)
kind_ = REG;
}
MoveOperand(MacroAssembler& masm, const ABIArg& arg);
MoveOperand(const MoveOperand& other)
- = default;
+ : kind_(other.kind_),
+ code_(other.code_),
+ disp_(other.disp_)
+ { }
bool isFloatReg() const {
return kind_ == FLOAT_REG;
}
bool isGeneralReg() const {
return kind_ == REG;
}
bool isGeneralRegPair() const {
#ifdef JS_CODEGEN_REGISTER_PAIR
--- a/js/src/jit/RegisterSets.h
+++ b/js/src/jit/RegisterSets.h
@@ -316,17 +316,18 @@ class TypedRegisterSet
public:
explicit constexpr TypedRegisterSet(SetType bits)
: bits_(bits)
{ }
constexpr TypedRegisterSet() : bits_(0)
{ }
- constexpr TypedRegisterSet(const TypedRegisterSet<T>& set) = default;
+ constexpr TypedRegisterSet(const TypedRegisterSet<T>& set) : bits_(set.bits_)
+ { }
static inline TypedRegisterSet All() {
return TypedRegisterSet(T::Codes::AllocatableMask);
}
static inline TypedRegisterSet Intersect(const TypedRegisterSet& lhs,
const TypedRegisterSet& rhs) {
return TypedRegisterSet(lhs.bits_ & rhs.bits_);
}
@@ -1084,17 +1085,18 @@ class TypedRegisterIterator
{
LiveSet<TypedRegisterSet<T>> regset_;
public:
explicit TypedRegisterIterator(TypedRegisterSet<T> regset) : regset_(regset)
{ }
explicit TypedRegisterIterator(LiveSet<TypedRegisterSet<T>> regset) : regset_(regset)
{ }
- TypedRegisterIterator(const TypedRegisterIterator& other) = default;
+ TypedRegisterIterator(const TypedRegisterIterator& other) : regset_(other.regset_)
+ { }
bool more() const {
return !regset_.empty();
}
TypedRegisterIterator<T>& operator ++() {
regset_.takeAny();
return *this;
}
@@ -1177,17 +1179,18 @@ class AnyRegisterIterator
{ }
explicit AnyRegisterIterator(const RegisterSet& set)
: geniter_(set.gpr_), floatiter_(set.fpu_)
{ }
explicit AnyRegisterIterator(const LiveSet<RegisterSet>& set)
: geniter_(set.gprs()), floatiter_(set.fpus())
{ }
AnyRegisterIterator(const AnyRegisterIterator& other)
- = default;
+ : geniter_(other.geniter_), floatiter_(other.floatiter_)
+ { }
bool more() const {
return geniter_.more() || floatiter_.more();
}
AnyRegisterIterator& operator ++() {
if (geniter_.more())
++geniter_;
else
++floatiter_;
--- a/js/src/jit/shared/Assembler-shared.h
+++ b/js/src/jit/shared/Assembler-shared.h
@@ -394,17 +394,18 @@ class RepatchLabel
// An absolute label is like a Label, except it represents an absolute
// reference rather than a relative one. Thus, it cannot be patched until after
// linking.
struct AbsoluteLabel : public LabelBase
{
public:
AbsoluteLabel()
{ }
- AbsoluteLabel(const AbsoluteLabel& label) = default;
+ AbsoluteLabel(const AbsoluteLabel& label) : LabelBase(label)
+ { }
int32_t prev() const {
MOZ_ASSERT(!bound());
if (!used())
return INVALID_OFFSET;
return offset();
}
void setPrev(int32_t offset) {
use(offset);
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -463,17 +463,17 @@ class MOZ_RAII JS_PUBLIC_API(CustomAutoR
: AutoGCRooter(cx, CUSTOM)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
}
friend void AutoGCRooter::trace(JSTracer* trc);
protected:
- virtual ~CustomAutoRooter() = default;
+ virtual ~CustomAutoRooter() {}
/** Supplied by derived class to trace roots. */
virtual void trace(JSTracer* trc) = 0;
private:
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
@@ -4498,17 +4498,17 @@ GetWaitForAllPromise(JSContext* cx, cons
* JSContext's owner thread, possibly executes on other threads, completes, and
* then needs to be scheduled to run again on the JSContext's owner thread. The
* embedding provides for this final dispatch back to the JSContext's owner
* thread by calling methods on this interface when requested.
*/
struct JS_PUBLIC_API(AsyncTask)
{
AsyncTask() : user(nullptr) {}
- virtual ~AsyncTask() = default;
+ virtual ~AsyncTask() {}
/**
* After the FinishAsyncTaskCallback is called and succeeds, one of these
* two functions will be called on the original JSContext's owner thread.
*/
virtual void finish(JSContext* cx) = 0;
virtual void cancel(JSContext* cx) = 0;
--- a/js/src/jsatom.h
+++ b/js/src/jsatom.h
@@ -41,17 +41,17 @@ AtomToPrintableString(ExclusiveContext*
class AtomStateEntry
{
uintptr_t bits;
static const uintptr_t NO_TAG_MASK = uintptr_t(-1) - 1;
public:
AtomStateEntry() : bits(0) {}
- AtomStateEntry(const AtomStateEntry& other) = default;
+ AtomStateEntry(const AtomStateEntry& other) : bits(other.bits) {}
AtomStateEntry(JSAtom* ptr, bool tagged)
: bits(uintptr_t(ptr) | uintptr_t(tagged))
{
MOZ_ASSERT((uintptr_t(ptr) & 0x1) == 0);
}
bool isPinned() const {
return bits & 0x1;
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -425,17 +425,17 @@ proxy_FunToString(JSContext* cx, JS::Han
* need the source code, say, in response to a call to Function.prototype.
* toSource or Debugger.Source.prototype.text, then we call the 'load' member
* function of the instance of this class that has hopefully been registered
* with the runtime, passing the code's URL, and hope that it will be able to
* find the source.
*/
class SourceHook {
public:
- virtual ~SourceHook() = default;
+ virtual ~SourceHook() { }
/**
* Set |*src| and |*length| to refer to the source code for |filename|.
* On success, the caller owns the buffer to which |*src| points, and
* should use JS_free to free it.
*/
virtual bool load(JSContext* cx, const char* filename, char16_t** src, size_t* length) = 0;
};
@@ -2713,17 +2713,17 @@ class MOZ_RAII JS_FRIEND_API(AutoCTypesA
callback = nullptr;
}
}
};
// Abstract base class for objects that build allocation metadata for JavaScript
// values.
struct AllocationMetadataBuilder {
- AllocationMetadataBuilder() = default;
+ AllocationMetadataBuilder() { }
// Return a metadata object for the newly constructed object |obj|, or
// nullptr if there's no metadata to attach.
//
// Implementations should treat all errors as fatal; there is no way to
// report errors from this callback. In particular, the caller provides an
// oomUnsafe for overriding implementations to use.
virtual JSObject* build(JSContext* cx, JS::HandleObject obj,
@@ -2912,26 +2912,26 @@ ToWindowProxyIfWindow(JSObject* obj);
extern JS_FRIEND_API(JSObject*)
ToWindowIfWindowProxy(JSObject* obj);
} /* namespace js */
class NativeProfiler
{
public:
- virtual ~NativeProfiler() = default;;
+ virtual ~NativeProfiler() {};
virtual void sampleNative(void* addr, uint32_t size) = 0;
virtual void removeNative(void* addr) = 0;
virtual void reset() = 0;
};
class GCHeapProfiler
{
public:
- virtual ~GCHeapProfiler() = default;;
+ virtual ~GCHeapProfiler() {};
virtual void sampleTenured(void* addr, uint32_t size) = 0;
virtual void sampleNursery(void* addr, uint32_t size) = 0;
virtual void markTenuredStart() = 0;
virtual void markTenured(void* addr) = 0;
virtual void sweepTenured() = 0;
virtual void sweepNursery() = 0;
virtual void moveNurseryToTenured(void* addrOld, void* addrNew) = 0;
virtual void reset() = 0;
--- a/js/src/vm/ArrayBufferObject.h
+++ b/js/src/vm/ArrayBufferObject.h
@@ -456,29 +456,32 @@ ArrayBufferObject& AsArrayBuffer(HandleO
ArrayBufferObject& AsArrayBuffer(JSObject* obj);
extern uint32_t JS_FASTCALL
ClampDoubleToUint8(const double x);
struct uint8_clamped {
uint8_t val;
- uint8_clamped() = default;
- uint8_clamped(const uint8_clamped& other) = default;
+ uint8_clamped() { }
+ uint8_clamped(const uint8_clamped& other) : val(other.val) { }
// invoke our assignment helpers for constructor conversion
explicit uint8_clamped(uint8_t x) { *this = x; }
explicit uint8_clamped(uint16_t x) { *this = x; }
explicit uint8_clamped(uint32_t x) { *this = x; }
explicit uint8_clamped(int8_t x) { *this = x; }
explicit uint8_clamped(int16_t x) { *this = x; }
explicit uint8_clamped(int32_t x) { *this = x; }
explicit uint8_clamped(double x) { *this = x; }
- uint8_clamped& operator=(const uint8_clamped& x) = default;
+ uint8_clamped& operator=(const uint8_clamped& x) {
+ val = x.val;
+ return *this;
+ }
uint8_clamped& operator=(uint8_t x) {
val = x;
return *this;
}
uint8_clamped& operator=(uint16_t x) {
val = (x > 255) ? 255 : uint8_t(x);
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -286,17 +286,17 @@ class RegExpGuard : public JS::CustomAut
};
class RegExpCompartment
{
struct Key {
JSAtom* atom;
uint16_t flag;
- Key() = default;
+ Key() {}
Key(JSAtom* atom, RegExpFlag flag)
: atom(atom), flag(flag)
{ }
MOZ_IMPLICIT Key(RegExpShared* shared)
: atom(shared->getSource()), flag(shared->getFlags())
{ }
typedef Key Lookup;
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -1627,17 +1627,17 @@ struct MOZ_RAII AutoSetThreadIsSweeping
~AutoSetThreadIsSweeping() {
MOZ_ASSERT(threadData_->gcSweeping);
threadData_->gcSweeping = false;
}
private:
PerThreadData* threadData_;
#else
- AutoSetThreadIsSweeping() = default;
+ AutoSetThreadIsSweeping() {}
#endif
};
} // namespace gc
/*
* Provides a delete policy that can be used for objects which have their
* lifetime managed by the GC and can only safely be destroyed while the nursery
--- a/js/src/vm/Scope.h
+++ b/js/src/vm/Scope.h
@@ -1217,17 +1217,18 @@ class MOZ_STACK_CLASS ScopeIter
public:
explicit ScopeIter(Scope* scope)
: scope_(scope)
{ }
explicit ScopeIter(JSScript* script);
explicit ScopeIter(const ScopeIter& si)
- = default;
+ : scope_(si.scope_)
+ { }
bool done() const {
return !scope_;
}
explicit operator bool() const {
return !done();
}
--- a/js/xpconnect/src/BackstagePass.h
+++ b/js/xpconnect/src/BackstagePass.h
@@ -41,17 +41,17 @@ public:
void SetGlobalObject(JSObject* global);
explicit BackstagePass(nsIPrincipal* prin) :
mPrincipal(prin)
{
}
private:
- virtual ~BackstagePass() = default;
+ virtual ~BackstagePass() { }
nsCOMPtr<nsIPrincipal> mPrincipal;
XPCWrappedNative* mWrapper;
};
nsresult
NS_NewBackstagePass(BackstagePass** ret);
--- a/js/xpconnect/src/SandboxPrivate.h
+++ b/js/xpconnect/src/SandboxPrivate.h
@@ -54,14 +54,14 @@ public:
}
void ObjectMoved(JSObject* obj, const JSObject* old)
{
UpdateWrapper(obj, old);
}
private:
- virtual ~SandboxPrivate() = default;
+ virtual ~SandboxPrivate() { }
nsCOMPtr<nsIPrincipal> mPrincipal;
};
#endif // __SANDBOXPRIVATE_H__
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -2253,17 +2253,17 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPCSCRIPTABLE
NS_DECL_NSIXPCCOMPONENTS_UTILS
public:
nsXPCComponents_Utils() { }
private:
- virtual ~nsXPCComponents_Utils() = default;
+ virtual ~nsXPCComponents_Utils() { }
nsCOMPtr<nsIXPCComponents_utils_Sandbox> mSandbox;
};
NS_INTERFACE_MAP_BEGIN(nsXPCComponents_Utils)
NS_INTERFACE_MAP_ENTRY(nsIXPCComponents_Utils)
NS_INTERFACE_MAP_ENTRY(nsIXPCScriptable)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXPCComponents_Utils)
NS_INTERFACE_MAP_END
@@ -3154,17 +3154,17 @@ nsXPCComponents_Utils::GetIncumbentGloba
class WrappedJSHolder : public nsISupports
{
NS_DECL_ISUPPORTS
WrappedJSHolder() {}
RefPtr<nsXPCWrappedJS> mWrappedJS;
private:
- virtual ~WrappedJSHolder() = default;
+ virtual ~WrappedJSHolder() {}
};
NS_IMPL_ISUPPORTS0(WrappedJSHolder);
NS_IMETHODIMP
nsXPCComponents_Utils::GenerateXPCWrappedJS(HandleValue aObj, HandleValue aScope,
JSContext* aCx, nsISupports** aOut)
{
if (!aObj.isObject())
@@ -3375,20 +3375,22 @@ nsXPCComponentsBase::nsXPCComponentsBase
}
nsXPCComponents::nsXPCComponents(XPCWrappedNativeScope* aScope)
: nsXPCComponentsBase(aScope)
{
}
nsXPCComponentsBase::~nsXPCComponentsBase()
-= default;
+{
+}
nsXPCComponents::~nsXPCComponents()
-= default;
+{
+}
void
nsXPCComponentsBase::ClearMembers()
{
mInterfaces = nullptr;
mInterfacesByID = nullptr;
mResults = nullptr;
}
--- a/js/xpconnect/src/XPCJSWeakReference.h
+++ b/js/xpconnect/src/XPCJSWeakReference.h
@@ -8,17 +8,17 @@
#define xpcjsweakreference_h___
#include "xpcIJSWeakReference.h"
#include "nsIWeakReference.h"
#include "mozilla/Attributes.h"
class xpcJSWeakReference final : public xpcIJSWeakReference
{
- ~xpcJSWeakReference() = default;
+ ~xpcJSWeakReference() {}
public:
xpcJSWeakReference();
nsresult Init(JSContext* cx, const JS::Value& object);
NS_DECL_ISUPPORTS
NS_DECL_XPCIJSWEAKREFERENCE
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -1049,17 +1049,17 @@ public:
protected:
virtual ~XPCWrappedNativeScope();
XPCWrappedNativeScope() = delete;
private:
class ClearInterpositionsObserver final : public nsIObserver {
- ~ClearInterpositionsObserver() = default;
+ ~ClearInterpositionsObserver() {}
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
};
static XPCWrappedNativeScope* gScopes;
static XPCWrappedNativeScope* gDyingScopes;
@@ -1306,17 +1306,17 @@ public:
MOZ_ASSERT(addition);
}
// This represents the existing set |baseSet| with the interface
// |addition| inserted after existing interfaces. |addition| must
// not already be present in |baseSet|.
explicit XPCNativeSetKey(XPCNativeSet* baseSet,
XPCNativeInterface* addition);
- ~XPCNativeSetKey() = default;
+ ~XPCNativeSetKey() {}
XPCNativeSet* GetBaseSet() const {return mBaseSet;}
XPCNativeInterface* GetAddition() const {return mAddition;}
PLDHashNumber Hash() const;
// Allow shallow copy
@@ -2325,17 +2325,17 @@ class xpcProperty : public nsIProperty
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPROPERTY
xpcProperty(const char16_t* aName, uint32_t aNameLen, nsIVariant* aValue);
private:
- virtual ~xpcProperty() = default;
+ virtual ~xpcProperty() {}
nsString mName;
nsCOMPtr<nsIVariant> mValue;
};
/***************************************************************************/
// class here just for static methods
class XPCConvert
@@ -2712,17 +2712,17 @@ protected:
};
class nsScriptError final : public nsScriptErrorBase {
public:
nsScriptError() {}
NS_DECL_THREADSAFE_ISUPPORTS
private:
- virtual ~nsScriptError() = default;
+ virtual ~nsScriptError() {}
};
class nsScriptErrorWithStack : public nsScriptErrorBase {
public:
explicit nsScriptErrorWithStack(JS::HandleObject);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsScriptErrorWithStack)
@@ -2982,17 +2982,17 @@ public:
void SetCCGeneration(uint32_t aGen)
{
mCCGeneration = aGen;
}
uint32_t CCGeneration() { return mCCGeneration; }
protected:
- virtual ~XPCVariant() = default;
+ virtual ~XPCVariant() { }
bool InitializeData(JSContext* cx);
protected:
nsDiscriminatedUnion mData;
JS::Heap<JS::Value> mJSVal;
bool mReturnRawObject : 1;
uint32_t mCCGeneration : 31;
--- a/js/xpconnect/src/xpcpublic.h
+++ b/js/xpconnect/src/xpcpublic.h
@@ -552,17 +552,17 @@ class ErrorReport {
nsString mSourceLine;
uint64_t mWindowID;
uint32_t mLineNumber;
uint32_t mColumn;
uint32_t mFlags;
bool mIsMuted;
private:
- ~ErrorReport() = default;
+ ~ErrorReport() {}
};
void
DispatchScriptErrorEvent(nsPIDOMWindowInner* win, JS::RootingContext* rootingCx,
xpc::ErrorReport* xpcReport, JS::Handle<JS::Value> exception);
// Get a stack of the sort that can be passed to
// xpc::ErrorReport::LogToConsoleWithStack from the given exception value. Can
--- a/js/xpconnect/wrappers/XrayWrapper.h
+++ b/js/xpconnect/wrappers/XrayWrapper.h
@@ -56,17 +56,17 @@ enum XrayType {
XrayForJSObject,
XrayForOpaqueObject,
NotXray
};
class XrayTraits
{
public:
- constexpr XrayTraits() = default;
+ constexpr XrayTraits() {}
static JSObject* getTargetObject(JSObject* wrapper) {
return js::UncheckedUnwrap(wrapper, /* stopAtWindowProxy = */ false);
}
virtual bool resolveNativeProperty(JSContext* cx, JS::HandleObject wrapper,
JS::HandleObject holder, JS::HandleId id,
JS::MutableHandle<JS::PropertyDescriptor> desc) = 0;