ladybird/Tests/LibWeb/Text/input/iterating-over-storage.html
Jonne Ransijn cc0fce3983 LibWeb: Fix infinite loop in Storage::internal_own_property_keys
Since `Storage::item_value` never returns an empty Optional,
and since `PlatformObject::is_supported_property_index` only
returns false when `item_value` returns an empty Optional,
the loop in `PlatformObject::internal_own_property_keys` will
never terminate when executed on a `Storage` instance.

This fix allows youtube.com to load successfully :^)
2024-10-25 12:42:29 +02:00

8 lines
182 B
HTML

<!DOCTYPE html>
<script src="include.js"></script>
<script>
test(() => {
for (_ in window.localStorage);
println("PASS (didn't loop forever)");
});
</script>