1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibWeb: Avoid introducing a reference cycle in ResourceLoader::load()

Previously we were kinda sorta resolving the reference cycle, but let's
just keep the requests in a hashtable instead of relying on hard to
track refcount tricks.
Fixes #7314.
This commit is contained in:
Ali Mohammad Pur 2021-09-19 02:56:05 +04:30 committed by Ali Mohammad Pur
parent 65f7e45a75
commit e780ee2832
2 changed files with 7 additions and 5 deletions

View file

@ -13,6 +13,7 @@
namespace Protocol {
class RequestClient;
class Request;
}
namespace Web {
@ -53,6 +54,7 @@ private:
int m_pending_loads { 0 };
HashTable<NonnullRefPtr<Protocol::Request>> m_active_requests;
RefPtr<Protocol::RequestClient> m_protocol_client;
String m_user_agent;
};