Bug 1394831 part 8 - Remove flags argument from addAccessorProperty. r=bhackett

This commit is contained in:
Jan de Mooij 2017-11-01 11:39:52 +01:00
parent 27c6fe5777
commit 041d19551d
5 changed files with 10 additions and 11 deletions

View File

@ -1025,7 +1025,7 @@ AddLengthProperty(JSContext* cx, HandleArrayObject obj)
return NativeObject::addAccessorProperty(cx, obj, lengthId,
array_length_getter, array_length_setter,
JSPROP_PERMANENT | JSPROP_SHADOWABLE,
0, /* allowDictionary = */ false);
/* allowDictionary = */ false);
}
static bool

View File

@ -1426,7 +1426,7 @@ AddOrChangeProperty(JSContext* cx, HandleNativeObject obj, HandleId id,
desc.attributes());
} else {
shape = NativeObject::addAccessorProperty(cx, obj, id, desc.getter(), desc.setter(),
desc.attributes(), 0);
desc.attributes());
}
} else {
if (Shape::isDataProperty(desc.attributes(), desc.getter(), desc.setter())) {

View File

@ -858,8 +858,8 @@ class NativeObject : public ShapedObject
static MOZ_ALWAYS_INLINE Shape* addAccessorProperty(JSContext* cx, HandleNativeObject obj, HandleId id,
JSGetterOp getter, JSSetterOp setter,
unsigned attrs, unsigned flags,
bool allowDictionary = true);
unsigned attrs, bool allowDictionary = true);
static Shape* addEnumerableDataProperty(JSContext* cx, HandleNativeObject obj, HandleId id);
/* Add a data property whose id is not yet in this scope. */
@ -901,7 +901,7 @@ class NativeObject : public ShapedObject
static Shape*
addAccessorPropertyInternal(JSContext* cx, HandleNativeObject obj, HandleId id,
JSGetterOp getter, JSSetterOp setter, unsigned attrs,
unsigned flags, ShapeTable::Entry* entry, bool allowDictionary,
ShapeTable::Entry* entry, bool allowDictionary,
const AutoKeepShapeTables& keep);
static MOZ_MUST_USE bool fillInAfterSwap(JSContext* cx, HandleNativeObject obj,

View File

@ -413,7 +413,7 @@ NativeObject::addDataProperty(JSContext* cx, HandleNativeObject obj, HandleId id
/* static */ MOZ_ALWAYS_INLINE Shape*
NativeObject::addAccessorProperty(JSContext* cx, HandleNativeObject obj, HandleId id,
GetterOp getter, SetterOp setter, unsigned attrs,
unsigned flags, bool allowDictionary)
bool allowDictionary)
{
MOZ_ASSERT(!JSID_IS_VOID(id));
MOZ_ASSERT(obj->uninlinedNonProxyIsExtensible());
@ -428,7 +428,7 @@ NativeObject::addAccessorProperty(JSContext* cx, HandleNativeObject obj, HandleI
entry = &table->search<MaybeAdding::Adding>(id, keep);
}
return addAccessorPropertyInternal(cx, obj, id, getter, setter, attrs, flags, entry,
return addAccessorPropertyInternal(cx, obj, id, getter, setter, attrs, entry,
allowDictionary, keep);
}

View File

@ -479,7 +479,7 @@ class MOZ_RAII AutoCheckShapeConsistency
NativeObject::addAccessorPropertyInternal(JSContext* cx,
HandleNativeObject obj, HandleId id,
GetterOp getter, SetterOp setter,
unsigned attrs, unsigned flags, ShapeTable::Entry* entry,
unsigned attrs, ShapeTable::Entry* entry,
bool allowDictionary, const AutoKeepShapeTables& keep)
{
MOZ_ASSERT_IF(!allowDictionary, !obj->inDictionaryMode());
@ -521,7 +521,7 @@ NativeObject::addAccessorPropertyInternal(JSContext* cx,
if (!nbase)
return nullptr;
Rooted<StackShape> child(cx, StackShape(nbase, id, SHAPE_INVALID_SLOT, attrs, flags));
Rooted<StackShape> child(cx, StackShape(nbase, id, SHAPE_INVALID_SLOT, attrs, 0));
child.updateGetterSetter(getter, setter);
shape = getChildProperty(cx, obj, last, &child);
if (!shape)
@ -953,8 +953,7 @@ NativeObject::putAccessorProperty(JSContext* cx, HandleNativeObject obj, HandleI
*/
MOZ_ASSERT(obj->nonProxyIsExtensible());
return addAccessorPropertyInternal(cx, obj, id, getter, setter, attrs, 0, entry, true,
keep);
return addAccessorPropertyInternal(cx, obj, id, getter, setter, attrs, entry, true, keep);
}
/* Property exists: search must have returned a valid entry. */