mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibWeb: Don't store reference to temporary in resolve_module_specifier
An environment settings object will return a copy to the URL. From a quick glance, we could probably make an environment settings object return a reference to one, but let's just change this code to make a copy since its not safe to rely on that.
This commit is contained in:
parent
7b678d3e1f
commit
43f75dcba0
Notes:
github-actions[bot]
2024-11-24 22:31:00 +00:00
Author: https://github.com/shannonbooth
Commit: 43f75dcba0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2556
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/yyny
1 changed files with 2 additions and 2 deletions
|
@ -85,8 +85,8 @@ ByteString module_type_from_module_request(JS::ModuleRequest const& module_reque
|
|||
WebIDL::ExceptionOr<URL::URL> resolve_module_specifier(Optional<Script&> referring_script, ByteString const& specifier)
|
||||
{
|
||||
// 1. Let settingsObject and baseURL be null.
|
||||
Optional<EnvironmentSettingsObject&> settings_object;
|
||||
Optional<URL::URL const&> base_url;
|
||||
GC::Ptr<EnvironmentSettingsObject> settings_object;
|
||||
Optional<URL::URL> base_url;
|
||||
|
||||
// 2. If referringScript is not null, then:
|
||||
if (referring_script.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue