mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Default initialize StructuredDeserialize memory argument
This is optional in the spec, so let's make it actually optional at the call site.
This commit is contained in:
parent
617b8eed75
commit
9724c67be2
Notes:
github-actions[bot]
2024-11-23 15:44:57 +00:00
Author: https://github.com/shannonbooth
Commit: 9724c67be2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2518
8 changed files with 8 additions and 8 deletions
|
@ -87,7 +87,7 @@ bool NavigationDestination::same_document() const
|
|||
WebIDL::ExceptionOr<JS::Value> NavigationDestination::get_state()
|
||||
{
|
||||
// The getState() method steps are to return StructuredDeserialize(this's state).
|
||||
return structured_deserialize(vm(), m_state, realm(), {});
|
||||
return structured_deserialize(vm(), m_state, realm());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ WebIDL::ExceptionOr<JS::Value> NavigationHistoryEntry::get_state()
|
|||
// 2. Return StructuredDeserialize(this's session history entry's navigation API state). Rethrow any exceptions.
|
||||
// NOTE: This can in theory throw an exception, if attempting to deserialize a large ArrayBuffer
|
||||
// when not enough memory is available.
|
||||
return structured_deserialize(vm(), m_session_history_entry->navigation_api_state(), realm(), {});
|
||||
return structured_deserialize(vm(), m_session_history_entry->navigation_api_state(), realm());
|
||||
}
|
||||
|
||||
void NavigationHistoryEntry::set_ondispose(WebIDL::CallbackType* event_handler)
|
||||
|
|
|
@ -54,7 +54,7 @@ WebIDL::ExceptionOr<SerializationRecord> structured_serialize(JS::VM& vm, JS::Va
|
|||
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, SerializationMemory&);
|
||||
|
||||
WebIDL::ExceptionOr<JS::Value> structured_deserialize(JS::VM& vm, SerializationRecord const& serialized, JS::Realm& target_realm, Optional<DeserializationMemory>);
|
||||
WebIDL::ExceptionOr<JS::Value> structured_deserialize(JS::VM& vm, SerializationRecord const& serialized, JS::Realm& target_realm, Optional<DeserializationMemory> = {});
|
||||
WebIDL::ExceptionOr<DeserializedRecord> structured_deserialize_internal(JS::VM& vm, ReadonlySpan<u32> const& serialized, JS::Realm& target_realm, DeserializationMemory& memory, Optional<size_t> position = {});
|
||||
|
||||
void serialize_boolean_primitive(SerializationRecord& serialized, JS::Value& value);
|
||||
|
|
|
@ -102,7 +102,7 @@ WebIDL::ExceptionOr<JS::Value> UniversalGlobalScopeMixin::structured_clone(JS::V
|
|||
|
||||
// 2. Let deserializeRecord be ? StructuredDeserializeWithTransfer(serialized, this's relevant realm).
|
||||
// FIXME: Use WithTransfer variant of the AO
|
||||
auto deserialized = TRY(structured_deserialize(vm, serialized, relevant_realm(this_impl()), {}));
|
||||
auto deserialized = TRY(structured_deserialize(vm, serialized, relevant_realm(this_impl())));
|
||||
|
||||
// 3. Return deserializeRecord.[[Deserialized]].
|
||||
return deserialized;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue