mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibWeb: Fix crash accessing 'empty' PromiseRejectionEvent reason
The 'reason' was getting initialized to 'empty' state when not provided through the constructor, which results in a crash when accessed through throw_dom_exception_if_needed in the generated IDL getter.
This commit is contained in:
parent
05b4676917
commit
6ac018bcb6
Notes:
github-actions[bot]
2024-12-02 23:20:42 +00:00
Author: https://github.com/shannonbooth
Commit: 6ac018bcb6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2702
Reviewed-by: https://github.com/gmta ✅
3 changed files with 62 additions and 1 deletions
|
@ -17,7 +17,7 @@ namespace Web::HTML {
|
|||
|
||||
struct PromiseRejectionEventInit : public DOM::EventInit {
|
||||
GC::Root<JS::Object> promise;
|
||||
JS::Value reason;
|
||||
JS::Value reason { JS::js_undefined() };
|
||||
};
|
||||
|
||||
class PromiseRejectionEvent final : public DOM::Event {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue