mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +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
|
@ -1190,9 +1190,10 @@ WebIDL::ExceptionOr<void> Window::window_post_message_steps(JS::Value message, W
|
|||
// 3. Let source be the WindowProxy object corresponding to incumbentSettings's global object (a Window object).
|
||||
auto& source = as<WindowProxy>(incumbent_settings.realm().global_environment().global_this_value());
|
||||
|
||||
TemporaryExecutionContext temporary_execution_context { target_realm, TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
|
||||
// 4. Let deserializeRecord be StructuredDeserializeWithTransfer(serializeWithTransferResult, targetRealm).
|
||||
auto temporary_execution_context = TemporaryExecutionContext { target_realm, TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
auto deserialize_record_or_error = structured_deserialize_with_transfer(vm(), serialize_with_transfer_result);
|
||||
auto deserialize_record_or_error = structured_deserialize_with_transfer(serialize_with_transfer_result, target_realm);
|
||||
|
||||
// If this throws an exception, catch it, fire an event named messageerror at targetWindow, using MessageEvent,
|
||||
// with the origin attribute initialized to origin and the source attribute initialized to source, and then return.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue