summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
authorMatthew Olsson <matthewcolsson@gmail.com>2020-06-03 14:34:52 -0700
committerAndreas Kling <kling@serenityos.org>2020-06-06 22:13:01 +0200
commit39ad42defdcb01f1fb0ffc83ee53b9152630f14f (patch)
treec5f683415f87b91d4ebd339715659b0812e4d452 /Libraries/LibJS/AST.cpp
parent58a72e9b810036ebdd91331137ce50e55dbe1ff4 (diff)
downloadserenity-39ad42defdcb01f1fb0ffc83ee53b9152630f14f.zip
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.
Diffstat (limited to 'Libraries/LibJS/AST.cpp')
-rw-r--r--Libraries/LibJS/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp
index 1bb684d7ee..840b29412d 100644
--- a/Libraries/LibJS/AST.cpp
+++ b/Libraries/LibJS/AST.cpp
@@ -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())