LibWeb: Fix local storage type in Window::local_storage()

The storage type was being incorrectly set to Session instead of Local,
apparently because of copying the implementation from
`Window::session_storage()`.

Bug introduced in commit 2066ed2318
This commit is contained in:
Michael Manganiello 2025-08-03 14:06:52 -03:00 committed by Alexander Kalenik
commit 7fed49ea5c
Notes: github-actions[bot] 2025-08-03 17:24:23 +00:00

View file

@ -477,7 +477,7 @@ WebIDL::ExceptionOr<GC::Ref<Storage>> Window::local_storage()
return WebIDL::SecurityError::create(realm, "localStorage is not available"_string);
// 4. Let storage be a new Storage object whose map is map.
auto storage = Storage::create(realm, Storage::Type::Session, *map);
auto storage = Storage::create(realm, Storage::Type::Local, *map);
// 5. Set this's associated Document's local storage holder to storage.
associated_document.set_local_storage_holder(storage);