mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibWeb/HTML: Enable callbacks in postMessage deserialization
Interestingly, the spec has a note saying: > window.postMessage() performs StructuredSerializeWithTransfer on > its arguments, but is careful to do so immediately, inside the > synchronous portion of its algorithm. Thus it is able to use the > algorithms without needing to prepare to run script and prepare > to run a callback. But there is no note about the deserialization steps. In any case, we do need callbacks enabled here.
This commit is contained in:
parent
bfbc0124c0
commit
fe7d7f6f6b
Notes:
github-actions[bot]
2025-01-20 12:53:32 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/fe7d7f6f6b9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3129 Reviewed-by: https://github.com/trflynn89
1 changed files with 1 additions and 1 deletions
|
@ -1136,7 +1136,7 @@ WebIDL::ExceptionOr<void> Window::window_post_message_steps(JS::Value message, W
|
|||
auto& source = verify_cast<WindowProxy>(incumbent_settings.realm().global_environment().global_this_value());
|
||||
|
||||
// 4. Let deserializeRecord be StructuredDeserializeWithTransfer(serializeWithTransferResult, targetRealm).
|
||||
auto temporary_execution_context = TemporaryExecutionContext { target_realm };
|
||||
auto temporary_execution_context = TemporaryExecutionContext { target_realm, TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
auto deserialize_record_or_error = structured_deserialize_with_transfer(vm(), serialize_with_transfer_result);
|
||||
|
||||
// If this throws an exception, catch it, fire an event named messageerror at targetWindow, using MessageEvent,
|
||||
|
|
Loading…
Add table
Reference in a new issue