mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09: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:
parent
62361e40a1
commit
c0bacc6c4b
Notes:
sideshowbarker
2024-07-16 22:11:09 +09:00
Author: https://github.com/awesomekling
Commit: c0bacc6c4b
Pull-request: https://github.com/SerenityOS/serenity/pull/21967
Issue: https://github.com/SerenityOS/serenity/issues/21737
Issue: https://github.com/SerenityOS/serenity/issues/21899
2 changed files with 2 additions and 2 deletions
|
@ -793,7 +793,7 @@ void fetch_descendants_of_and_link_a_module_script(JS::Realm& realm,
|
|||
});
|
||||
|
||||
// 7. Upon rejection of loadingPromise, run the following steps:
|
||||
WebIDL::upon_rejection(loading_promise, [&state, &module_script, on_complete](auto const&) -> WebIDL::ExceptionOr<JS::Value> {
|
||||
WebIDL::upon_rejection(loading_promise, [state, &module_script, on_complete](auto const&) -> WebIDL::ExceptionOr<JS::Value> {
|
||||
// 1. If state.[[ParseError]] is not null, set moduleScript's error to rethrow to state.[[ParseError]] and run
|
||||
// onComplete given moduleScript.
|
||||
if (!state->parse_error.is_null()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue