mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Use as to cast global object to WindowOrWorkerGlobalScopeMixin
No functional changes.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
3794665b0b
commit
6d7b7e7822
Notes:
github-actions[bot]
2025-02-02 16:19:57 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6d7b7e7822d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3428 Reviewed-by: https://github.com/gmta ✅
@@ -128,9 +128,8 @@ JS::Completion ClassicScript::run(RethrowErrors rethrow_errors, GC::Ptr<JS::Envi
|
||||
VERIFY(rethrow_errors == RethrowErrors::No);
|
||||
|
||||
// 1. Report an exception given by evaluationStatus.[[Value]] for realms's global object.
|
||||
auto* window_or_worker = dynamic_cast<WindowOrWorkerGlobalScopeMixin*>(&realm.global_object());
|
||||
VERIFY(window_or_worker);
|
||||
window_or_worker->report_an_exception(*evaluation_status.value());
|
||||
auto& window_or_worker = as<WindowOrWorkerGlobalScopeMixin>(realm.global_object());
|
||||
window_or_worker.report_an_exception(*evaluation_status.value());
|
||||
|
||||
// 2. Clean up after running script with realm.
|
||||
clean_up_after_running_script(realm);
|
||||
|
||||
Reference in New Issue
Block a user