mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Make the completion callbacks for dismissing dialogs required
All callers have been made async, i.e. they now all provide a completion callback. Let's make the callback required to discourage any future sync usage.
This commit is contained in:
parent
38aa051f12
commit
c0a45394a9
Notes:
github-actions[bot]
2024-11-04 21:17:43 +00:00
Author: https://github.com/trflynn89
Commit: c0a45394a9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2166
2 changed files with 4 additions and 4 deletions
|
@ -338,7 +338,7 @@ void Page::prompt_closed(Optional<String> response)
|
|||
}
|
||||
}
|
||||
|
||||
void Page::dismiss_dialog(JS::GCPtr<JS::HeapFunction<void()>> on_dialog_closed)
|
||||
void Page::dismiss_dialog(JS::NonnullGCPtr<JS::HeapFunction<void()>> on_dialog_closed)
|
||||
{
|
||||
m_on_pending_dialog_closed = on_dialog_closed;
|
||||
|
||||
|
@ -355,7 +355,7 @@ void Page::dismiss_dialog(JS::GCPtr<JS::HeapFunction<void()>> on_dialog_closed)
|
|||
}
|
||||
}
|
||||
|
||||
void Page::accept_dialog(JS::GCPtr<JS::HeapFunction<void()>> on_dialog_closed)
|
||||
void Page::accept_dialog(JS::NonnullGCPtr<JS::HeapFunction<void()>> on_dialog_closed)
|
||||
{
|
||||
m_on_pending_dialog_closed = on_dialog_closed;
|
||||
|
||||
|
|
|
@ -148,8 +148,8 @@ public:
|
|||
bool has_pending_dialog() const { return m_pending_dialog != PendingDialog::None; }
|
||||
PendingDialog pending_dialog() const { return m_pending_dialog; }
|
||||
Optional<String> const& pending_dialog_text() const { return m_pending_dialog_text; }
|
||||
void dismiss_dialog(JS::GCPtr<JS::HeapFunction<void()>> on_dialog_closed = nullptr);
|
||||
void accept_dialog(JS::GCPtr<JS::HeapFunction<void()>> on_dialog_closed = nullptr);
|
||||
void dismiss_dialog(JS::NonnullGCPtr<JS::HeapFunction<void()>> on_dialog_closed);
|
||||
void accept_dialog(JS::NonnullGCPtr<JS::HeapFunction<void()>> on_dialog_closed);
|
||||
|
||||
void did_request_color_picker(WeakPtr<HTML::HTMLInputElement> target, Color current_color);
|
||||
void color_picker_update(Optional<Color> picked_color, HTML::ColorPickerUpdateState state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue