mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +00:00
LibWeb: Update structured deserialization to accept its target realm
This is a formal parameter to this AO in the spec.
This commit is contained in:
parent
0c309d4660
commit
5eab109d85
Notes:
github-actions[bot]
2025-04-17 17:47:42 +00:00
Author: https://github.com/trflynn89
Commit: 5eab109d85
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4386
4 changed files with 9 additions and 8 deletions
|
@ -324,11 +324,11 @@ void MessagePort::post_message_task_steps(SerializedTransferRecord& serialize_wi
|
|||
|
||||
// 2. Let targetRealm be finalTargetPort's relevant realm.
|
||||
auto& target_realm = relevant_realm(*final_target_port);
|
||||
auto& target_vm = target_realm.vm();
|
||||
|
||||
TemporaryExecutionContext context { target_realm };
|
||||
|
||||
// 3. Let deserializeRecord be StructuredDeserializeWithTransfer(serializeWithTransferResult, targetRealm).
|
||||
TemporaryExecutionContext context { relevant_realm(*final_target_port) };
|
||||
auto deserialize_record_or_error = structured_deserialize_with_transfer(target_vm, serialize_with_transfer_result);
|
||||
auto deserialize_record_or_error = structured_deserialize_with_transfer(serialize_with_transfer_result, target_realm);
|
||||
if (deserialize_record_or_error.is_error()) {
|
||||
// If this throws an exception, catch it, fire an event named messageerror at finalTargetPort, using MessageEvent, and then return.
|
||||
auto exception = deserialize_record_or_error.release_error();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue