1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:57:34 +00:00

LibWeb: Protect XMLHttpRequest from GC in special circumstances

The XHR gives us a set of conditions where XHR objects must survive
garbage collection, even when there are no pointers to them on the heap.
This patch implements those conditions using the new cell
self-protection mechanism in LibJS.
This commit is contained in:
Andreas Kling 2022-10-24 14:57:28 +02:00
parent e0a08f2ab0
commit e448c74736
2 changed files with 35 additions and 0 deletions

View file

@ -65,6 +65,7 @@ public:
private:
virtual void visit_edges(Cell::Visitor&) override;
virtual bool must_survive_garbage_collection() const override;
void set_ready_state(ReadyState);
void set_status(Fetch::Infrastructure::Status status) { m_status = status; }