1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

LibWeb: Fix two bad capture-by-reference bugs caught by ASAN

In both cases, related to fetching/loading modules.
This commit is contained in:
Andreas Kling 2023-12-03 15:15:35 +01:00
parent 62361e40a1
commit c0bacc6c4b
2 changed files with 2 additions and 2 deletions

View file

@ -475,7 +475,7 @@ ErrorOr<void> initialize_main_thread_vm()
fetch_client = fetch_context.fetch_client;
}
auto on_single_fetch_complete = HTML::create_on_fetch_script_complete(realm.heap(), [referrer, &realm, load_state, &module_request, payload](JS::GCPtr<HTML::Script> const& module_script) -> void {
auto on_single_fetch_complete = HTML::create_on_fetch_script_complete(realm.heap(), [referrer, &realm, load_state, module_request, payload](JS::GCPtr<HTML::Script> const& module_script) -> void {
// onSingleFetchComplete given moduleScript is the following algorithm:
// 1. Let completion be null.
// NOTE: Our JS::Completion does not support non JS::Value types for its [[Value]], a such we