mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibJS: Don't assert for empty reciever if AllowSideEffects::No is given
This parameter is only used if AllowSideEffects::Yes, so there's no reason to pass anything to it if that's not used.
This commit is contained in:
parent
e523e530fc
commit
eb5c92d4e2
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,6 @@ bool Object::test_integrity_level(IntegrityLevel level)
|
|||
Value Object::get_own_property(const PropertyName& property_name, Value receiver, AllowSideEffects allow_side_effects) const
|
||||
{
|
||||
VERIFY(property_name.is_valid());
|
||||
VERIFY(!receiver.is_empty());
|
||||
|
||||
Value value_here;
|
||||
|
||||
|
@ -269,6 +268,7 @@ Value Object::get_own_property(const PropertyName& property_name, Value receiver
|
|||
|
||||
VERIFY(!value_here.is_empty());
|
||||
if (allow_side_effects == AllowSideEffects::Yes) {
|
||||
VERIFY(!receiver.is_empty());
|
||||
if (value_here.is_accessor())
|
||||
return value_here.as_accessor().call_getter(receiver);
|
||||
if (value_here.is_native_property())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue