1320408 - Part 8: Change JSObject::reportNotConfigurable and JSObject::reportNotExtensible to static method.

This commit is contained in:
Gaming4JC 2019-06-08 19:30:53 -04:00 • committed by Roy Tam
commit 7e0b20a7bf
3 changed files with 11 additions and 10 deletions

View file

@ -2451,7 +2451,7 @@ js::HasOwnDataPropertyPure(JSContext* cx, JSObject* obj, jsid id, bool* result)
return true;
}
bool
/* static */ bool
JSObject::reportReadOnly(JSContext* cx, jsid id, unsigned report)
{
RootedValue val(cx, IdToValue(id));
@ -2460,7 +2460,7 @@ JSObject::reportReadOnly(JSContext* cx, jsid id, unsigned report)
nullptr, nullptr);
}
bool
/* static */ bool
JSObject::reportNotConfigurable(JSContext* cx, jsid id, unsigned report)
{
RootedValue val(cx, IdToValue(id));
@ -2469,10 +2469,10 @@ JSObject::reportNotConfigurable(JSContext* cx, jsid id, unsigned report)
nullptr, nullptr);
}
bool
JSObject::reportNotExtensible(JSContext* cx, unsigned report)
/* static */ bool
JSObject::reportNotExtensible(JSContext* cx, HandleObject obj, unsigned report)
{
RootedValue val(cx, ObjectValue(*this));
RootedValue val(cx, ObjectValue(*obj));
return ReportValueErrorFlags(cx, report, JSMSG_OBJECT_NOT_EXTENSIBLE,
JSDVG_IGNORE_STACK, val, nullptr,
nullptr, nullptr);