mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 14:32:55 +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
|
@ -892,7 +892,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
|
|||
}
|
||||
} else {
|
||||
// 1. Let processedResponse be false.
|
||||
bool processed_response = false;
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA bool processed_response = false;
|
||||
|
||||
// 2. Let processResponseConsumeBody, given a response and nullOrFailureOrBytes, be these steps:
|
||||
auto process_response_consume_body = [this, &processed_response](GC::Ref<Fetch::Infrastructure::Response> response, Variant<Empty, Fetch::Infrastructure::FetchAlgorithms::ConsumeBodyFailureTag, ByteBuffer> null_or_failure_or_bytes) {
|
||||
|
@ -927,7 +927,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
|
|||
|
||||
// 4. Let now be the present time.
|
||||
// 5. Pause until either processedResponse is true or this’s timeout is not 0 and this’s timeout milliseconds have passed since now.
|
||||
bool did_time_out = false;
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA bool did_time_out = false;
|
||||
|
||||
if (m_timeout != 0) {
|
||||
auto timer = Platform::Timer::create_single_shot(heap(), m_timeout, nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue