mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Replace usages of dynamic_cast with as and as_if
This commit is contained in:
committed by
Jelle Raaijmakers
parent
d31aec25e8
commit
aadd563592
Notes:
github-actions[bot]
2025-08-22 18:27:13 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/aadd563592b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5953 Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/trflynn89
@@ -596,9 +596,8 @@ void EventLoop::perform_a_microtask_checkpoint()
|
||||
// 4. For each environment settings object settingsObject whose responsible event loop is this event loop, notify about rejected promises given settingsObject's global object.
|
||||
auto environments = GC::RootVector { heap(), m_related_environment_settings_objects };
|
||||
for (auto& environment_settings_object : environments) {
|
||||
auto* global = dynamic_cast<HTML::UniversalGlobalScopeMixin*>(&environment_settings_object->global_object());
|
||||
VERIFY(global);
|
||||
global->notify_about_rejected_promises({});
|
||||
auto& global = as<HTML::UniversalGlobalScopeMixin>(environment_settings_object->global_object());
|
||||
global.notify_about_rejected_promises({});
|
||||
}
|
||||
|
||||
// 5. Cleanup Indexed Database transactions.
|
||||
|
||||
Reference in New Issue
Block a user