LibWeb: Don't store GC::Root<JS::ArrayBuffer> in FileAPI::FileReader

This was creating a reference cycle and leaking the realm.
This commit is contained in:
Andreas Kling
2025-12-26 06:56:24 +01:00
committed by Jelle Raaijmakers
parent b291d75289
commit 2d2078d439
Notes: github-actions[bot] 2025-12-26 10:58:18 +00:00
4 changed files with 7 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ class FileReader : public DOM::EventTarget {
GC_DECLARE_ALLOCATOR(FileReader);
public:
using Result = Variant<Empty, String, GC::Root<JS::ArrayBuffer>>;
using Result = Variant<Empty, String, GC::Ref<JS::ArrayBuffer>>;
virtual ~FileReader() override;