mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Use as
to cast global object to WindowOrWorkerGlobalScopeMixin
No functional changes.
This commit is contained in:
parent
3794665b0b
commit
6d7b7e7822
Notes:
github-actions[bot]
2025-02-02 16:19:57 +00:00
Author: https://github.com/tcl3
Commit: 6d7b7e7822
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3428
Reviewed-by: https://github.com/gmta ✅
10 changed files with 30 additions and 44 deletions
|
@ -123,9 +123,8 @@ ErrorOr<void> WebSocket::establish_web_socket_connection(URL::URL& url_record, V
|
|||
{
|
||||
// FIXME: Integrate properly with FETCH as per https://fetch.spec.whatwg.org/#websocket-opening-handshake
|
||||
|
||||
auto* window_or_worker = dynamic_cast<HTML::WindowOrWorkerGlobalScopeMixin*>(&client.global_object());
|
||||
VERIFY(window_or_worker);
|
||||
auto origin_string = window_or_worker->origin().to_byte_string();
|
||||
auto& window_or_worker = as<HTML::WindowOrWorkerGlobalScopeMixin>(client.global_object());
|
||||
auto origin_string = window_or_worker.origin().to_byte_string();
|
||||
|
||||
Vector<ByteString> protcol_byte_strings;
|
||||
for (auto const& protocol : protocols)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue