mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibWeb/IDB: Implement IDBFactory::databases()
This commit is contained in:
parent
5559c3cb4f
commit
664c57af16
Notes:
github-actions[bot]
2025-03-14 07:55:38 +00:00
Author: https://github.com/stelar7
Commit: 664c57af16
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3923
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/shannonbooth
5 changed files with 75 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2024, stelar7 <dudedbz@gmail.com>
|
||||
* Copyright (c) 2024-2025, stelar7 <dudedbz@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -28,6 +28,16 @@ void Database::visit_edges(Visitor& visitor)
|
|||
visitor.visit(m_upgrade_transaction);
|
||||
}
|
||||
|
||||
Vector<GC::Root<Database>> Database::for_key(StorageAPI::StorageKey const& key)
|
||||
{
|
||||
Vector<GC::Root<Database>> databases;
|
||||
for (auto const& database_mapping : m_databases.get(key).value_or({})) {
|
||||
databases.append(database_mapping.value);
|
||||
}
|
||||
|
||||
return databases;
|
||||
}
|
||||
|
||||
RequestList& ConnectionQueueHandler::for_key_and_name(StorageAPI::StorageKey& key, String& name)
|
||||
{
|
||||
return ConnectionQueueHandler::the().m_open_requests.ensure(key, [] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue