mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibWeb: Push promise rejection handling onto UniversalGlobalScopeMixin
This is needed for shadow realms which don't have a window or worker global object. Fixes a crash for the attached test.
This commit is contained in:
parent
fb17f8ff66
commit
6a668f27c7
Notes:
github-actions[bot]
2024-11-30 11:07:17 +00:00
Author: https://github.com/shannonbooth
Commit: 6a668f27c7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2631
9 changed files with 129 additions and 109 deletions
|
@ -497,7 +497,7 @@ 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.
|
||||
for (auto& environment_settings_object : m_related_environment_settings_objects) {
|
||||
auto* global = dynamic_cast<HTML::WindowOrWorkerGlobalScopeMixin*>(&environment_settings_object->global_object());
|
||||
auto* global = dynamic_cast<HTML::UniversalGlobalScopeMixin*>(&environment_settings_object->global_object());
|
||||
VERIFY(global);
|
||||
global->notify_about_rejected_promises({});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue