mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +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:
parent
886ca9c7b6
commit
1c12f5c31d
14 changed files with 228 additions and 175 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue