mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
LibWeb: Add const qualifiers to Vector iteration in IndexedDB
This commit is contained in:
committed by
Jelle Raaijmakers
parent
0327541999
commit
452506964c
Notes:
github-actions[bot]
2024-12-14 22:04:36 +00:00
Author: https://github.com/stelar7 Commit: https://github.com/LadybirdBrowser/ladybird/commit/452506964c5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2696 Reviewed-by: https://github.com/gmta
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user