Issue #2142 - Change InitPropertyOperation to accept a PropertyName directy and use DefineDataProperty

Based-on: m-c 1413907, 1547129
This commit is contained in:
Martok 2023-04-09 19:18:03 +02:00 committed by roytam1
commit 627d0da7dc
4 changed files with 11 additions and 12 deletions

View file

@ -232,8 +232,7 @@ bool
InitProp(JSContext* cx, HandleObject obj, HandlePropertyName name, HandleValue value,
jsbytecode* pc)
{
RootedId id(cx, NameToId(name));
return InitPropertyOperation(cx, JSOp(*pc), obj, id, value);
return InitPropertyOperation(cx, JSOp(*pc), obj, name, value);
}
template<bool Equal>