mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibWeb: Update PromiseRejectionEvent's promise field to be object
This change was made in the HTML spec to address a comment from the
Gecko team for the Streams API in
a20ca78975
It also opens the door for some more Promise related refactors.
This commit is contained in:
parent
352a66390f
commit
52c449293a
Notes:
github-actions[bot]
2024-10-25 20:05:29 +00:00
Author: https://github.com/ADKaster
Commit: 52c449293a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1966
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 8 additions and 8 deletions
|
@ -16,7 +16,7 @@
|
|||
namespace Web::HTML {
|
||||
|
||||
struct PromiseRejectionEventInit : public DOM::EventInit {
|
||||
JS::Handle<JS::Promise> promise;
|
||||
JS::Handle<JS::Object> promise;
|
||||
JS::Value reason;
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
virtual ~PromiseRejectionEvent() override;
|
||||
|
||||
// Needs to return a pointer for the generated JS bindings to work.
|
||||
JS::Promise const* promise() const { return m_promise; }
|
||||
JS::Object const* promise() const { return m_promise; }
|
||||
JS::Value reason() const { return m_reason; }
|
||||
|
||||
private:
|
||||
|
@ -40,7 +40,7 @@ private:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
JS::GCPtr<JS::Promise> m_promise;
|
||||
JS::NonnullGCPtr<JS::Object> m_promise;
|
||||
JS::Value m_reason;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue