1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

LibWeb: Make StructuredSerialize/Deserialize friendlier to recursion

Make the internal calls take objects by reference, and take writable
spans into data rather than const& to the underlying vector type.
This commit is contained in:
Andrew Kaster 2023-09-12 16:41:13 -06:00 committed by Andreas Kling
parent e0fe77d012
commit bddf3fbf2d
Notes: sideshowbarker 2024-07-17 20:19:08 +09:00
2 changed files with 35 additions and 17 deletions

View file

@ -29,7 +29,7 @@ using SerializationMemory = HashMap<JS::Handle<JS::Value>, SerializationRange>;
WebIDL::ExceptionOr<SerializationRecord> structured_serialize(JS::VM& vm, JS::Value);
WebIDL::ExceptionOr<SerializationRecord> structured_serialize_for_storage(JS::VM& vm, JS::Value);
WebIDL::ExceptionOr<SerializationRecord> structured_serialize_internal(JS::VM& vm, JS::Value, bool for_storage, Optional<SerializationMemory>);
WebIDL::ExceptionOr<SerializationRecord> structured_serialize_internal(JS::VM& vm, JS::Value, bool for_storage, SerializationMemory&);
WebIDL::ExceptionOr<JS::Value> structured_deserialize(JS::VM& vm, SerializationRecord const& serialized, JS::Realm& target_realm, Optional<SerializationMemory>);