mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1148652, part 3 - Mark arguments.length as overridden when it is redefined via the C API. r=efaust.
This commit is contained in:
parent
04f1f59ecb
commit
1c594e8314
@ -1309,6 +1309,16 @@ js::NativeDefineProperty(ExclusiveContext* cx, HandleNativeObject obj, HandleId
|
||||
return false;
|
||||
return DefineTypedArrayElement(cx->asJSContext(), obj, index, desc_, result);
|
||||
}
|
||||
} else if (obj->is<ArgumentsObject>()) {
|
||||
if (id == NameToId(cx->names().length)) {
|
||||
// Either we are resolving the .length property on this object, or
|
||||
// redefining it. In the latter case only, we must set a bit. To
|
||||
// distinguish the two cases, we note that when resolving, the
|
||||
// property won't already exist; whereas the first time it is
|
||||
// redefined, it will.
|
||||
if (obj->containsPure(id))
|
||||
obj->as<ArgumentsObject>().markLengthOverridden();
|
||||
}
|
||||
}
|
||||
|
||||
Rooted<PropertyDescriptor> desc(cx, desc_);
|
||||
|
Loading…
Reference in New Issue
Block a user