ladybird/Libraries/LibWeb/FileAPI
Luke Wilde d08d6b08d3 LibWeb: Use enum for serialization and reimplement interface exposure
Our currently implementation of structured serialization has a design
flaw, where if the serialized/transferred type was not used in the
destination realm, it would not be seen as exposed and thus we would
not re-create the type on the other side.

This is very common, for example, transferring a MessagePort to a just
inserted iframe, or the just inserted iframe transferring a MessagePort
to it's parent. This is what Google reCAPTCHA does.

This flaw occurred due to relying on lazily populated HashMaps of
constructors, namespaces and interfaces. This commit changes it so that
per-type "is exposed" implementations are generated.

Since it no longer relies on interface name strings, this commit
changes serializable types to indicate their type with an enum,
in line with how transferrable types indicate their type.

This makes Google reCAPTCHA work on https://www.google.com/recaptcha/api2/demo
It currently doesn't work on non-Google origins due to a separate
same-origin policy bug.
2025-07-15 09:20:02 -04:00
..
Blob.cpp LibWeb/FileAPI: Handle an aborted stream in Blob::get_stream() close 2025-05-31 09:12:57 -04:00
Blob.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
Blob.idl
BlobURLStore.cpp LibWeb: Update revokeObjectURL for reported spec bugs 2025-01-22 12:33:55 +00:00
BlobURLStore.h LibWeb: Update revokeObjectURL for reported spec bugs 2025-01-22 12:33:55 +00:00
File.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
File.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
File.idl
FileList.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
FileList.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
FileList.idl
FileReader.cpp AK+Everywhere: Allow lonely UTF-16 surrogates by default 2025-07-03 09:51:56 -04:00
FileReader.h LibWeb: Implement FileReaderSync interface 2025-02-28 04:49:51 +00:00
FileReader.idl
FileReaderSync.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
FileReaderSync.h LibWeb: Implement FileReaderSync interface 2025-02-28 04:49:51 +00:00
FileReaderSync.idl LibWeb: Implement FileReaderSync interface 2025-02-28 04:49:51 +00:00