Bug 1068024 - Fix more bad implicit constructors in JS; r=luke,Waldo

--HG--
extra : rebase_source : 1eea3e7dfc3235a1b99d7deb131efda07dde4eac
This commit is contained in:
Ehsan Akhgari 2014-09-23 22:04:52 -04:00
parent 65a6bddd89
commit 6904219eef
6 changed files with 8 additions and 8 deletions

View File

@ -274,7 +274,7 @@ class Node {
}
// Constructors accepting SpiderMonkey's other generic-pointer-ish types.
Node(JS::HandleValue value);
explicit Node(JS::HandleValue value);
Node(JSGCTraceKind kind, void *ptr);
// copy construction and copy assignment just use memcpy, since we know

View File

@ -2069,7 +2069,7 @@ ByteSize(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
mozilla::MallocSizeOf mallocSizeOf = cx->runtime()->debuggerMallocSizeOf;
JS::ubi::Node node = args.get(0);
JS::ubi::Node node(args.get(0));
if (node)
args.rval().set(NumberValue(node.size(mallocSizeOf)));
else

View File

@ -8768,7 +8768,7 @@ class OutOfLineIsCallable : public OutOfLineCodeBase<CodeGenerator>
LIsCallable *ins_;
public:
OutOfLineIsCallable(LIsCallable *ins)
explicit OutOfLineIsCallable(LIsCallable *ins)
: ins_(ins)
{ }

View File

@ -146,7 +146,7 @@ class LSimdSplatX4 : public LInstructionHelper<1, 1, 0>
class LSimdExtractElementBase : public LInstructionHelper<1, 1, 0>
{
protected:
LSimdExtractElementBase(const LAllocation &base) {
explicit LSimdExtractElementBase(const LAllocation &base) {
setOperand(0, base);
}
@ -164,7 +164,7 @@ class LSimdExtractElementI : public LSimdExtractElementBase
{
public:
LIR_HEADER(SimdExtractElementI);
LSimdExtractElementI(const LAllocation &base)
explicit LSimdExtractElementI(const LAllocation &base)
: LSimdExtractElementBase(base)
{}
};
@ -173,7 +173,7 @@ class LSimdExtractElementF : public LSimdExtractElementBase
{
public:
LIR_HEADER(SimdExtractElementF);
LSimdExtractElementF(const LAllocation &base)
explicit LSimdExtractElementF(const LAllocation &base)
: LSimdExtractElementBase(base)
{}
};

View File

@ -9899,7 +9899,7 @@ class MIteratorMore
class MIsNoIter
: public MUnaryInstruction
{
MIsNoIter(MDefinition *def)
explicit MIsNoIter(MDefinition *def)
: MUnaryInstruction(def)
{
setResultType(MIRType_Boolean);

View File

@ -388,7 +388,7 @@ IsScriptedProxy(JSObject *obj)
class MOZ_STACK_CLASS ProxyOptions {
protected:
/* protected constructor for subclass */
ProxyOptions(bool singletonArg)
explicit ProxyOptions(bool singletonArg)
: singleton_(singletonArg),
clasp_(ProxyClassPtr)
{}