mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
LibWeb: Implement transfer for Resizable/ArrayBuffer
Implement transfer logic for ArrayBuffer and ResizableArrayBuffer. Change TransferDataHolder data type to Vector<u32> to reuse existing serialization infrastructure. Fix 5 WPT tests in `window-postmessage.window.html` that relates to transport. Fix `LibWeb/Text/input/Worker/Worker-postMessage-transfer.html`. The latter is currently ignored due to flakiness, no rebaseline is needed. During serialization with transfer, initialize memory with known index and initialize Serializer at position that dependent on the memory. This is mandatory to make ArrayBuffer transport to work. It also happens to fix 4 WPT tests, that are related to curcular references during serialization.
This commit is contained in:
committed by
Tim Ledbetter
parent
163b8a69e3
commit
9dad8f55a4
@@ -25,7 +25,7 @@
|
||||
namespace Web::HTML {
|
||||
|
||||
struct TransferDataHolder {
|
||||
Vector<u8> data;
|
||||
Vector<u32> data;
|
||||
Vector<IPC::File> fds;
|
||||
};
|
||||
|
||||
@@ -46,6 +46,8 @@ struct DeserializedRecord {
|
||||
|
||||
enum class TransferType : u8 {
|
||||
MessagePort,
|
||||
ArrayBuffer,
|
||||
ResizableArrayBuffer,
|
||||
};
|
||||
|
||||
WebIDL::ExceptionOr<SerializationRecord> structured_serialize(JS::VM& vm, JS::Value);
|
||||
|
||||
Reference in New Issue
Block a user