mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
LibJS: Avoid transitions in GlobalObject::initialize_constructor()
We don't need transitions for either of these: - Adding the 'name' property to a constructor object - Adding the 'constructor' property to its prototype object
This commit is contained in:
parent
47ab84ffd9
commit
45eef97906
1 changed files with 2 additions and 2 deletions
|
@ -136,11 +136,11 @@ inline void GlobalObject::initialize_constructor(PropertyName const& property_na
|
||||||
{
|
{
|
||||||
auto& vm = this->vm();
|
auto& vm = this->vm();
|
||||||
constructor = heap().allocate<ConstructorType>(*this, *this);
|
constructor = heap().allocate<ConstructorType>(*this, *this);
|
||||||
constructor->define_direct_property(vm.names.name, js_string(heap(), property_name.as_string()), Attribute::Configurable);
|
constructor->define_direct_property_without_transition(vm.names.name, js_string(heap(), property_name.as_string()), Attribute::Configurable);
|
||||||
if (vm.exception())
|
if (vm.exception())
|
||||||
return;
|
return;
|
||||||
if (prototype) {
|
if (prototype) {
|
||||||
prototype->define_direct_property(vm.names.constructor, constructor, Attribute::Writable | Attribute::Configurable);
|
prototype->define_direct_property_without_transition(vm.names.constructor, constructor, Attribute::Writable | Attribute::Configurable);
|
||||||
if (vm.exception())
|
if (vm.exception())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue