-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Rename ConnectionQueue to RequestList
- Loading branch information
Showing
6 changed files
with
67 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2024, stelar7 <[email protected]> | ||
* | ||
* 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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (c) 2024, stelar7 <[email protected]> | ||
* | ||
* SPDX-License-Identifier: BSD-2-Clause | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <AK/Vector.h> | ||
#include <LibGC/Root.h> | ||
#include <LibWeb/IndexedDB/IDBRequest.h> | ||
|
||
namespace Web::IndexedDB { | ||
|
||
class RequestList : public AK::Vector<GC::Root<IDBRequest>> { | ||
public: | ||
bool all_requests_processed() const; | ||
bool all_previous_requests_processed(GC::Ref<IDBRequest> const& request) const; | ||
}; | ||
|
||
} |