mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01: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
|
|
@ -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…
Reference in New Issue
Block a user