mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibWeb: Add const qualifiers to Vector iteration in IndexedDB
This commit is contained in:
parent
0327541999
commit
452506964c
Notes:
github-actions[bot]
2024-12-14 22:04:36 +00:00
Author: https://github.com/stelar7
Commit: 452506964c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2696
Reviewed-by: https://github.com/gmta
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ WebIDL::ExceptionOr<GC::Ref<IDBDatabase>> open_a_database_connection(JS::Realm&
|
|||
// queue a task to fire a version change event named versionchange at entry with db’s version and version.
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA u32 events_to_fire = open_connections.size();
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA u32 events_fired = 0;
|
||||
for (auto& entry : open_connections) {
|
||||
for (auto const& entry : open_connections) {
|
||||
if (!entry->close_pending()) {
|
||||
HTML::queue_a_task(HTML::Task::Source::DatabaseAccess, nullptr, nullptr, GC::create_function(realm.vm().heap(), [&realm, entry, db, version, &events_fired]() {
|
||||
fire_a_version_change_event(realm, HTML::EventNames::versionchange, *entry, db->version(), version);
|
||||
|
@ -99,7 +99,7 @@ WebIDL::ExceptionOr<GC::Ref<IDBDatabase>> open_a_database_connection(JS::Realm&
|
|||
|
||||
// 4. If any of the connections in openConnections are still not closed,
|
||||
// queue a task to fire a version change event named blocked at request with db’s version and version.
|
||||
for (auto& entry : open_connections) {
|
||||
for (auto const& entry : open_connections) {
|
||||
if (entry->state() != IDBDatabase::ConnectionState::Closed) {
|
||||
HTML::queue_a_task(HTML::Task::Source::DatabaseAccess, nullptr, nullptr, GC::create_function(realm.vm().heap(), [&realm, entry, db, version]() {
|
||||
fire_a_version_change_event(realm, HTML::EventNames::blocked, *entry, db->version(), version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue