mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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
|
@ -327,9 +327,8 @@ JS::Completion invoke_callback(WebIDL::CallbackType& callback, Optional<JS::Valu
|
|||
// FIXME: 1. Assert: callable’s return type is undefined or any.
|
||||
|
||||
// 2. Report an exception completion.[[Value]] for relevant realm’s global object.
|
||||
auto* window_or_worker = dynamic_cast<HTML::WindowOrWorkerGlobalScopeMixin*>(&relevant_realm.global_object());
|
||||
VERIFY(window_or_worker);
|
||||
window_or_worker->report_an_exception(*completion.release_value());
|
||||
auto& window_or_worker = as<HTML::WindowOrWorkerGlobalScopeMixin>(relevant_realm.global_object());
|
||||
window_or_worker.report_an_exception(*completion.release_value());
|
||||
|
||||
// 3. Return the unique undefined IDL value.
|
||||
return JS::js_undefined();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue