mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibWeb: Consolidate serialization of integral and floating point types
This consolidates serialization and deserialization of integral and floating point types into two templated functions.
This commit is contained in:
committed by
Andreas Kling
parent
4205ac778f
commit
57e7d6e989
@@ -104,7 +104,7 @@ WebIDL::ExceptionOr<void> File::serialization_steps(HTML::SerializationRecord& r
|
||||
TRY(HTML::serialize_string(vm, record, m_name));
|
||||
|
||||
// 4. Set serialized.[[LastModified]] to the value of value’s lastModified attribute.
|
||||
HTML::serialize_i64(record, m_last_modified);
|
||||
HTML::serialize_primitive_type(record, m_last_modified);
|
||||
|
||||
return {};
|
||||
}
|
||||
@@ -126,7 +126,7 @@ WebIDL::ExceptionOr<void> File::deserialization_steps(ReadonlySpan<u32> const& r
|
||||
m_name = TRY(HTML::deserialize_string(vm, record, position));
|
||||
|
||||
// 4. Initialize the value of value’s lastModified attribute to serialized.[[LastModified]].
|
||||
m_last_modified = HTML::deserialize_i64(record, position);
|
||||
m_last_modified = HTML::deserialize_primitive_type<i64>(record, position);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user