mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-09 04:32:51 +00:00
LibWeb: Get Page from principal realm during resource loading
Fixes a crash for module loading for a shadow realm.
This commit is contained in:
parent
b677844f8d
commit
4913dac745
Notes:
github-actions[bot]
2024-11-24 22:30:46 +00:00
Author: https://github.com/shannonbooth
Commit: 4913dac745
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2556
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/yyny
4 changed files with 13 additions and 1 deletions
Libraries/LibWeb/Fetch/Fetching
|
@ -2240,7 +2240,7 @@ WebIDL::ExceptionOr<GC::Ref<PendingResponse>> nonstandard_resource_loader_file_o
|
|||
|
||||
auto request = fetch_params.request();
|
||||
|
||||
auto& page = Bindings::principal_host_defined_page(realm);
|
||||
auto& page = Bindings::principal_host_defined_page(HTML::principal_realm(realm));
|
||||
|
||||
// NOTE: Using LoadRequest::create_for_url_on_page here will unconditionally add cookies as long as there's a page available.
|
||||
// However, it is up to http_network_or_cache_fetch to determine if cookies should be added to the request.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue