diff options
author | Andreas Kling <kling@serenityos.org> | 2022-10-06 18:27:24 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-10-06 18:29:52 +0200 |
commit | 19494b436b1c1bc3e11de6af549471b14205a2cb (patch) | |
tree | 34990b7e0447fb02aa5d4aee088747e1a1c82b0a /Userland/Libraries | |
parent | b9a45cf1aa9aa90a352225679d60d0b9e46a48ce (diff) | |
download | serenity-19494b436b1c1bc3e11de6af549471b14205a2cb.zip |
LibWeb: Fix unsafe capture in fetch_external_module_script_graph()
We can't be capturing the AK::URL by reference here, since on_complete
may be called later, after the value is no longer alive.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp index 2e7492729c..6e18fc7dfe 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp +++ b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp @@ -268,7 +268,7 @@ void fetch_external_module_script_graph(AK::URL const& url, EnvironmentSettingsO { // 1. Fetch a single module script given url, settings object, "script", options, settings object, "client", true, and with the following steps given result: // FIXME: Pass options. - fetch_single_module_script(url, settings_object, "script"sv, settings_object, "client"sv, {}, TopLevelModule::Yes, [&settings_object, on_complete = move(on_complete), &url](auto* result) mutable { + fetch_single_module_script(url, settings_object, "script"sv, settings_object, "client"sv, {}, TopLevelModule::Yes, [&settings_object, on_complete = move(on_complete), url](auto* result) mutable { // 1. If result is null, run onComplete given null, and abort these steps. if (!result) { on_complete(nullptr); |