Revert "LibJS+LibWeb: Return Vector<PropertyKey> from…
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

internal_own_property_keys"

This reverts commit 5ee810f772.
This commit is contained in:
Tim Ledbetter 2025-05-16 04:14:12 +01:00 committed by Tim Ledbetter
parent 8cd9275416
commit 2903defcfc
Notes: github-actions[bot] 2025-05-16 05:34:06 +00:00
24 changed files with 155 additions and 134 deletions

View file

@ -1863,8 +1863,8 @@ inline ThrowCompletionOr<Value> get_object_property_iterator(Interpreter& interp
seen_objects.set(*object_to_check);
auto keys = TRY(object_to_check->internal_own_property_keys());
properties.ensure_capacity(properties.size() + keys.size());
for (auto& property_key : keys) {
if (property_key.is_symbol())
for (auto& key : keys) {
if (key.is_symbol())
continue;
// NOTE: If there is a non-enumerable property higher up the prototype chain with the same key,
@ -1872,7 +1872,7 @@ inline ThrowCompletionOr<Value> get_object_property_iterator(Interpreter& interp
// This is achieved with the PropertyKeyAndEnumerableFlag struct, which doesn't consider
// the enumerable flag when comparing keys.
PropertyKeyAndEnumerableFlag new_entry {
.key = property_key,
.key = TRY(PropertyKey::from_value(vm, key)),
.enumerable = false,
};
@ -1884,7 +1884,7 @@ inline ThrowCompletionOr<Value> get_object_property_iterator(Interpreter& interp
continue;
new_entry.enumerable = *descriptor->enumerable;
properties.set(move(new_entry), property_key.to_value(vm), AK::HashSetExistingEntryBehavior::Keep);
properties.set(move(new_entry), key, AK::HashSetExistingEntryBehavior::Keep);
}
}