mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Mark local variables captured in GC functions as ignored
These variables are all captured in queued events or other event loop tasks, but are all guarded by event loop spins later in the function. The IGNORE_USE_IN_ESCAPING_LAMBDA will soon be required for all locals that are captured by ref in GC::Function as well as AK::Function.
This commit is contained in:
parent
31d21570bf
commit
6ed2bf2bb1
Notes:
github-actions[bot]
2024-12-10 06:14:10 +00:00
Author: https://github.com/ADKaster
Commit: 6ed2bf2bb1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2860
6 changed files with 17 additions and 16 deletions
|
@ -79,8 +79,8 @@ WebIDL::ExceptionOr<GC::Ref<IDBDatabase>> open_a_database_connection(JS::Realm&
|
|||
|
||||
// 2. For each entry of openConnections that does not have its close pending flag set to true,
|
||||
// queue a task to fire a version change event named versionchange at entry with db’s version and version.
|
||||
u32 events_to_fire = open_connections.size();
|
||||
u32 events_fired = 0;
|
||||
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) {
|
||||
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]() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue