mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
LibJS: Add Proxy objects
Includes all traps except the following: [[Call]], [[Construct]], [[OwnPropertyKeys]]. An important implication of this commit is that any call to any virtual Object method has the potential to throw an exception. These methods were not checked in this commit -- a future commit will have to protect these various method calls throughout the codebase.
This commit is contained in:
committed by
Andreas Kling
parent
58a72e9b81
commit
39ad42defd
@@ -359,7 +359,7 @@ Value ForInStatement::execute(Interpreter& interpreter) const
|
||||
return {};
|
||||
auto* object = rhs_result.to_object(interpreter);
|
||||
while (object) {
|
||||
auto property_names = object->get_own_properties(*object, Object::GetOwnPropertyMode::Key, Attribute::Enumerable);
|
||||
auto property_names = object->get_own_properties(*object, Object::GetOwnPropertyMode::Key, true);
|
||||
for (auto& property_name : property_names.as_object().indexed_properties()) {
|
||||
interpreter.set_variable(variable_name, property_name.value_and_attributes(object).value);
|
||||
if (interpreter.exception())
|
||||
|
||||
Reference in New Issue
Block a user