mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:25:06 +00:00
LibWeb: Extract serialization logic for primitives and object primitives
To avoid differing logic for serializing similar types, move the logic into separate helpers.
This commit is contained in:
parent
98e272ce15
commit
c384f22d67
2 changed files with 100 additions and 24 deletions
|
@ -51,6 +51,17 @@ WebIDL::ExceptionOr<SerializationRecord> structured_serialize_internal(JS::VM& v
|
|||
|
||||
WebIDL::ExceptionOr<JS::Value> structured_deserialize(JS::VM& vm, SerializationRecord const& serialized, JS::Realm& target_realm, Optional<DeserializationMemory>);
|
||||
|
||||
void serialize_boolean_primitive(SerializationRecord& serialized, JS::Value& value);
|
||||
void serialize_number_primitive(SerializationRecord& serialized, JS::Value& value);
|
||||
WebIDL::ExceptionOr<void> serialize_big_int_primitive(JS::VM& vm, SerializationRecord& serialized, JS::Value& value);
|
||||
WebIDL::ExceptionOr<void> serialize_string_primitive(JS::VM& vm, SerializationRecord& serialized, JS::Value& value);
|
||||
void serialize_boolean_object(SerializationRecord& serialized, JS::Value& value);
|
||||
void serialize_number_object(SerializationRecord& serialized, JS::Value& value);
|
||||
WebIDL::ExceptionOr<void> serialize_big_int_object(JS::VM& vm, SerializationRecord& serialized, JS::Value& value);
|
||||
WebIDL::ExceptionOr<void> serialize_string_object(JS::VM& vm, SerializationRecord& serialized, JS::Value& value);
|
||||
void serialize_date_object(SerializationRecord& serialized, JS::Value& value);
|
||||
WebIDL::ExceptionOr<void> serialize_reg_exp_object(JS::VM& vm, SerializationRecord& serialized, JS::Value& value);
|
||||
|
||||
WebIDL::ExceptionOr<void> serialize_bytes(JS::VM& vm, Vector<u32>& vector, ReadonlyBytes bytes);
|
||||
WebIDL::ExceptionOr<void> serialize_string(JS::VM& vm, Vector<u32>& vector, DeprecatedFlyString const& string);
|
||||
WebIDL::ExceptionOr<void> serialize_string(JS::VM& vm, Vector<u32>& vector, String const& string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue