Bug 1290337 - Part 17: Replace Value parameter to const Value& in dom/bindings. r=smaug

This commit is contained in:
Tooru Fujisawa 2016-09-11 18:15:24 +09:00
parent 26cadb42f0
commit d7c8c69a03
4 changed files with 9 additions and 9 deletions

View File

@ -274,7 +274,7 @@ class Optional<JS::Value>
private:
Optional() = delete;
explicit Optional(JS::Value aValue) = delete;
explicit Optional(const JS::Value& aValue) = delete;
};
// A specialization of Optional for NonNull that lets us get a T& from Value()

View File

@ -10453,7 +10453,7 @@ class CGClass(CGThing):
def declare(self, cgClass):
name = cgClass.getNameString()
return ("%s(const %s&) = delete;\n"
"void operator=(const %s) = delete;\n" % (name, name, name))
"void operator=(const %s&) = delete;\n" % (name, name, name))
disallowedCopyConstructors = [DisallowedCopyConstructor()]
else:
@ -13843,7 +13843,7 @@ class CGNativeMember(ClassMethod):
if self.member.isMethod() and self.member.isLegacycaller():
# If it has an identifier, we can't deal with it yet
assert self.member.isIdentifierLess()
args.insert(0, Argument("JS::Value", "aThisVal"))
args.insert(0, Argument("const JS::Value&", "aThisVal"))
# And jscontext bits.
if needCx(returnType, argList, self.extendedAttrs,
self.passJSBitsAsNeeded, self.member.isStatic()):

View File

@ -244,7 +244,7 @@ FillPropertyDescriptor(JS::MutableHandle<JS::PropertyDescriptor> desc,
inline void
FillPropertyDescriptor(JS::MutableHandle<JS::PropertyDescriptor> desc,
JSObject* obj, JS::Value v,
JSObject* obj, const JS::Value& v,
bool readonly, bool enumerable = true)
{
desc.value().set(v);
@ -253,7 +253,7 @@ FillPropertyDescriptor(JS::MutableHandle<JS::PropertyDescriptor> desc,
inline void
FillPropertyDescriptor(JS::MutableHandle<JS::PropertyDescriptor> desc,
JSObject* obj, unsigned attributes, JS::Value v)
JSObject* obj, unsigned attributes, const JS::Value& v)
{
desc.object().set(obj);
desc.value().set(v);

View File

@ -805,11 +805,11 @@ public:
int8_t DeprecatedAttribute();
int8_t SetDeprecatedAttribute(int8_t);
int8_t DeprecatedMethod();
int8_t DeprecatedMethodWithContext(JSContext*, JS::Value);
int8_t DeprecatedMethodWithContext(JSContext*, const JS::Value&);
// Static methods and attributes
static void StaticMethod(const GlobalObject&, bool);
static void StaticMethodWithContext(const GlobalObject&, JS::Value);
static void StaticMethodWithContext(const GlobalObject&, const JS::Value&);
static bool StaticAttribute(const GlobalObject&);
static void SetStaticAttribute(const GlobalObject&, bool);
static void Assert(const GlobalObject&, bool);
@ -818,7 +818,7 @@ public:
static int8_t StaticDeprecatedAttribute(const GlobalObject&);
static int8_t SetStaticDeprecatedAttribute(const GlobalObject&, int8_t);
static int8_t StaticDeprecatedMethod(const GlobalObject&);
static int8_t StaticDeprecatedMethodWithContext(const GlobalObject&, JS::Value);
static int8_t StaticDeprecatedMethodWithContext(const GlobalObject&, const JS::Value&);
// Overload resolution tests
bool Overload1(TestInterface&);
@ -933,7 +933,7 @@ public:
void SetThrowingGetterAttr(bool arg);
bool ThrowingSetterAttr() const;
void SetThrowingSetterAttr(bool arg, ErrorResult& aRv);
int16_t LegacyCall(JS::Value, uint32_t, TestInterface&);
int16_t LegacyCall(const JS::Value&, uint32_t, TestInterface&);
void PassArgsWithDefaults(JSContext*, const Optional<int32_t>&,
TestInterface*, const Dict&, double,
const Optional<float>&);