Fix assertions with Save As dialog

Fixes some issues introduced by 8e79307a62 (see #3314) and
6354d8daf1 (see #3239).

To test:
- Run `cefclient --url=chrome://net-export`
- Click the "Start Logging to Disk" button
- Exit cefclient; get no debug assertions
This commit is contained in:
Marshall Greenblatt
2024-06-20 13:55:23 -04:00
parent 7d739b3d33
commit 5ab32347b8
3 changed files with 19 additions and 7 deletions

View File

@@ -39,6 +39,8 @@ class CefSelectFileDialogFactory final : public ui::SelectFileDialogFactory {
// Delegates the running of the dialog to CefFileDialogManager.
class CefSelectFileDialog final : public ui::SelectFileDialog {
public:
// |listener| is not owned by this object. It will remain valid until
// ListenerDestroyed() is called.
CefSelectFileDialog(ui::SelectFileDialog::Listener* listener,
std::unique_ptr<ui::SelectFilePolicy> policy)
: ui::SelectFileDialog(listener, std::move(policy)) {