mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 18:23:39 +00:00
LibURL+LibWeb: Make URL serialization return a String
This can only ever fail from OOM, and will never by string containing random byte sequences.
This commit is contained in:
parent
9724c67be2
commit
8f6fe1de83
Notes:
github-actions[bot]
2024-11-23 15:44:52 +00:00
Author: https://github.com/shannonbooth
Commit: 8f6fe1de83
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2518
15 changed files with 24 additions and 30 deletions
|
@ -1077,7 +1077,7 @@ WebIDL::ExceptionOr<void> Window::window_post_message_steps(JS::Value message, W
|
|||
// with the origin attribute initialized to origin and the source attribute initialized to source, and then return.
|
||||
if (deserialize_record_or_error.is_exception()) {
|
||||
MessageEventInit message_event_init {};
|
||||
message_event_init.origin = MUST(String::from_byte_string(origin));
|
||||
message_event_init.origin = origin;
|
||||
message_event_init.source = GC::make_root(source);
|
||||
|
||||
auto message_error_event = MessageEvent::create(target_realm, EventNames::messageerror, message_event_init);
|
||||
|
@ -1103,7 +1103,7 @@ WebIDL::ExceptionOr<void> Window::window_post_message_steps(JS::Value message, W
|
|||
// the source attribute initialized to source, the data attribute initialized to messageClone, and the ports attribute
|
||||
// initialized to newPorts.
|
||||
MessageEventInit message_event_init {};
|
||||
message_event_init.origin = MUST(String::from_byte_string(origin));
|
||||
message_event_init.origin = origin;
|
||||
message_event_init.source = GC::make_root(source);
|
||||
message_event_init.data = message_clone;
|
||||
message_event_init.ports = move(new_ports);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue