mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb: Make Fetch::Infrastructure::{Request,Response} ref-counted
With the addition of the 'fetch params' struct, the single ownership model we had so far falls apart completely. Additionally, this works nicely for FilteredResponse's internal response instead of risking a dangling reference. Replacing the public constructor with a create() function also found a few instances of a Request being stack-allocated!
This commit is contained in:
@@ -23,10 +23,10 @@ struct NavigationParams {
|
||||
String id;
|
||||
|
||||
// null or a request that started the navigation
|
||||
OwnPtr<Fetch::Infrastructure::Request> request;
|
||||
RefPtr<Fetch::Infrastructure::Request> request;
|
||||
|
||||
// a response that ultimately was navigated to (potentially a network error)
|
||||
NonnullOwnPtr<Fetch::Infrastructure::Response> response;
|
||||
NonnullRefPtr<Fetch::Infrastructure::Response> response;
|
||||
|
||||
// an origin to use for the new Document
|
||||
Origin origin;
|
||||
|
||||
Reference in New Issue
Block a user