Files
serenity/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
Timothy Flynn 1848d1c6d9 LibWeb: Disallow creating a FileAPI::FileList with a vector of files
This factory forced callers to make a list of GC-allocated FileAPI::File
objects. This isn't safe - this opens a window for these files to be
garbage collected before the FileList object stores / visits the list.

Instead, only allow creating an empty FileList and incrementally adding
files to that list.

(cherry picked from commit 8b4d28b5fd7857e3ee47a8d50aa9c01920dcfb4b)
2024-11-01 19:58:08 -04:00

106 KiB