1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-12 02:30:30 +09:00

LibWeb: Make factory method of FileAPI::FileList fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 19:57:46 +01:00 committed by Linus Groh
parent 15917146d3
commit 6688f89ad3
Notes: sideshowbarker 2024-07-17 00:14:28 +09:00
3 changed files with 5 additions and 5 deletions

View file

@ -11,9 +11,9 @@
namespace Web::FileAPI {
JS::NonnullGCPtr<FileList> FileList::create(JS::Realm& realm, Vector<JS::NonnullGCPtr<File>>&& files)
WebIDL::ExceptionOr<JS::NonnullGCPtr<FileList>> FileList::create(JS::Realm& realm, Vector<JS::NonnullGCPtr<File>>&& files)
{
return realm.heap().allocate<FileList>(realm, realm, move(files)).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<FileList>(realm, realm, move(files)));
}
FileList::FileList(JS::Realm& realm, Vector<JS::NonnullGCPtr<File>>&& files)