mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-25 19:51:59 +00:00
LibWeb: Prevent crash when loading module in worker
The import map is defined for all global objects, not just the window.
This commit is contained in:
parent
fc4a2eeba8
commit
93e2babc64
Notes:
github-actions[bot]
2025-02-28 13:52:18 +00:00
Author: https://github.com/Gingeh
Commit: 93e2babc64
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3714
Reviewed-by: https://github.com/awesomekling
4 changed files with 11 additions and 9 deletions
|
@ -317,7 +317,7 @@ ScriptFetchOptions get_descendant_script_fetch_options(ScriptFetchOptions const&
|
|||
String resolve_a_module_integrity_metadata(const URL::URL& url, EnvironmentSettingsObject& settings_object)
|
||||
{
|
||||
// 1. Let map be settingsObject's global object's import map.
|
||||
auto map = as<Window>(settings_object.global_object()).import_map();
|
||||
auto map = as<UniversalGlobalScopeMixin>(settings_object.global_object()).import_map();
|
||||
|
||||
// 2. If map's integrity[url] does not exist, then return the empty string.
|
||||
// 3. Return map's integrity[url].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue