mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Rename ConnectionQueue to RequestList
This commit is contained in:
parent
439245b14a
commit
b43bb2429a
Notes:
github-actions[bot]
2025-01-14 22:47:13 +00:00
Author: https://github.com/stelar7
Commit: b43bb2429a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3190
Reviewed-by: https://github.com/Lubrsi
Reviewed-by: https://github.com/gmta ✅
6 changed files with 67 additions and 28 deletions
33
Libraries/LibWeb/IndexedDB/Internal/RequestList.cpp
Normal file
33
Libraries/LibWeb/IndexedDB/Internal/RequestList.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2024, stelar7 <dudedbz@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/IndexedDB/Internal/RequestList.h>
|
||||
|
||||
namespace Web::IndexedDB {
|
||||
|
||||
bool RequestList::all_requests_processed() const
|
||||
{
|
||||
for (auto const& entry : *this) {
|
||||
if (!entry->processed())
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RequestList::all_previous_requests_processed(GC::Ref<IDBRequest> const& request) const
|
||||
{
|
||||
for (auto const& entry : *this) {
|
||||
if (entry == request)
|
||||
return true;
|
||||
if (!entry->processed())
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue