mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibJS: Remove unnecessary check in for..in iterator implementation
This commit is contained in:
parent
fb3d1c2754
commit
f6141df589
Notes:
github-actions[bot]
2025-03-20 17:52:26 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/f6141df5893 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4017
1 changed files with 1 additions and 5 deletions
|
@ -1778,11 +1778,7 @@ inline ThrowCompletionOr<Object*> get_object_property_iterator(VM& vm, Value val
|
|||
|
||||
auto callback = NativeFunction::create(
|
||||
*vm.current_realm(), [items = move(properties), result_object, value_offset, done_offset](VM& vm) mutable -> ThrowCompletionOr<Value> {
|
||||
auto iterated_object_value = vm.this_value();
|
||||
if (!iterated_object_value.is_object())
|
||||
return vm.throw_completion<InternalError>("Invalid state for GetObjectPropertyIterator.next"sv);
|
||||
|
||||
auto& iterated_object = iterated_object_value.as_object();
|
||||
auto& iterated_object = vm.this_value().as_object();
|
||||
while (true) {
|
||||
if (items.is_empty()) {
|
||||
result_object->put_direct(done_offset, JS::Value(true));
|
||||
|
|
Loading…
Add table
Reference in a new issue