mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:15:08 +00:00
LibWeb: Make Document::page() return a Page&
Now that Document always has a Page, and always keeps it alive, we can make this return a Page&, exposing various unnecessary null checks.
This commit is contained in:
parent
70193c0009
commit
7c95ebc302
17 changed files with 43 additions and 78 deletions
|
@ -1425,10 +1425,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet
|
|||
auto document = Bindings::host_defined_environment_settings_object(realm).responsible_document();
|
||||
if (!document)
|
||||
return DeprecatedString::empty();
|
||||
auto* page = document->page();
|
||||
if (!page)
|
||||
return DeprecatedString::empty();
|
||||
return page->client().page_did_request_cookie(http_request->current_url(), Cookie::Source::Http);
|
||||
return document->page().client().page_did_request_cookie(http_request->current_url(), Cookie::Source::Http);
|
||||
})();
|
||||
|
||||
// 2. If cookies is not the empty string, then append (`Cookie`, cookies) to httpRequest’s header list.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue