LibWeb: Use as to cast global object to WindowOrWorkerGlobalScopeMixin

No functional changes.
This commit is contained in:
Tim Ledbetter 2025-02-02 15:42:57 +00:00 committed by Jelle Raaijmakers
commit 6d7b7e7822
Notes: github-actions[bot] 2025-02-02 16:19:57 +00:00
10 changed files with 30 additions and 44 deletions

View file

@ -779,9 +779,8 @@ void invoke_custom_element_reactions(Vector<GC::Root<DOM::Element>>& element_que
auto& realm = callback.callback->shape().realm();
auto& global = realm.global_object();
auto* window_or_worker = dynamic_cast<HTML::WindowOrWorkerGlobalScopeMixin*>(&global);
VERIFY(window_or_worker);
window_or_worker->report_an_exception(maybe_exception.error_value());
auto& window_or_worker = as<HTML::WindowOrWorkerGlobalScopeMixin>(global);
window_or_worker.report_an_exception(maybe_exception.error_value());
}
},
[&](DOM::CustomElementCallbackReaction& custom_element_callback_reaction) -> void {