mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
LibWeb: Ensure a Web::Page is associated with local Worker LoadRequests
This is a hack on top of a hack because Workers don't *really* need to
have a Web::Page at all, but the ResourceLoader infra that should be
going away soon ™️ is not quite ready to axe that requirement for
cookies.
This commit is contained in:
parent
5586340cf3
commit
d7d84ee931
2 changed files with 6 additions and 1 deletions
|
@ -234,8 +234,10 @@ void ResourceLoader::load(LoadRequest& request, SuccessCallback success_callback
|
|||
if (request.page().has_value())
|
||||
m_page = request.page().value();
|
||||
|
||||
if (!m_page.has_value())
|
||||
if (!m_page.has_value()) {
|
||||
log_failure(request, "INTERNAL ERROR: No Page for request");
|
||||
return;
|
||||
}
|
||||
|
||||
FileRequest file_request(url.serialize_path(), [this, success_callback = move(success_callback), error_callback = move(error_callback), log_success, log_failure, request](ErrorOr<i32> file_or_error) {
|
||||
--m_pending_loads;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue