diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2023-02-12 22:05:32 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-18 00:52:47 +0100 |
commit | 7ec444047ccc9a9c4c1d80f3e48f6fd52408c600 (patch) | |
tree | 602a7e63156303614c5c38879be9a3e26e3554df /Userland/Libraries/LibWeb/WebSockets | |
parent | 3d79cdf09599f0a5f85fe73656ad79b8814d528b (diff) | |
download | serenity-7ec444047ccc9a9c4c1d80f3e48f6fd52408c600.zip |
LibWeb: Make factory methods of HTML::MessageEvent fallible
Diffstat (limited to 'Userland/Libraries/LibWeb/WebSockets')
-rw-r--r-- | Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp index e0fa3f6ad9..7551f2c1b7 100644 --- a/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp +++ b/Userland/Libraries/LibWeb/WebSockets/WebSocket.cpp @@ -235,7 +235,7 @@ void WebSocket::on_message(ByteBuffer message, bool is_text) HTML::MessageEventInit event_init; event_init.data = JS::PrimitiveString::create(vm(), text_message); event_init.origin = url(); - dispatch_event(*HTML::MessageEvent::create(realm(), HTML::EventNames::message, event_init)); + dispatch_event(HTML::MessageEvent::create(realm(), HTML::EventNames::message, event_init).release_value_but_fixme_should_propagate_errors()); return; } @@ -247,7 +247,7 @@ void WebSocket::on_message(ByteBuffer message, bool is_text) HTML::MessageEventInit event_init; event_init.data = JS::ArrayBuffer::create(realm(), message); event_init.origin = url(); - dispatch_event(*HTML::MessageEvent::create(realm(), HTML::EventNames::message, event_init)); + dispatch_event(HTML::MessageEvent::create(realm(), HTML::EventNames::message, event_init).release_value_but_fixme_should_propagate_errors()); return; } |