mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +00:00
LibJS: Add parameter to delete_property since we need DeleteOrThrow
This commit is contained in:
parent
8a06a93ce2
commit
16b87b85e3
4 changed files with 16 additions and 9 deletions
|
@ -375,7 +375,7 @@ bool ProxyObject::put(const PropertyName& name, Value value, Value receiver)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ProxyObject::delete_property(const PropertyName& name)
|
||||
bool ProxyObject::delete_property(PropertyName const& name, bool force_throw_exception)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
if (m_is_revoked) {
|
||||
|
@ -386,7 +386,7 @@ bool ProxyObject::delete_property(const PropertyName& name)
|
|||
if (vm.exception())
|
||||
return false;
|
||||
if (!trap)
|
||||
return m_target.delete_property(name);
|
||||
return m_target.delete_property(name, force_throw_exception);
|
||||
auto trap_result = vm.call(*trap, Value(&m_handler), Value(&m_target), name.to_value(vm));
|
||||
if (vm.exception())
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue