### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

16.0.0

### What operating system are you using?

macOS

### Operating System Version

Monterey

### What arch are you using?

x64

### Last Known Working Electron version

15.3.1

### Expected Behavior

The file chooser dialog (eg in this same GH issue edit page) where it says "Attach files by dragging....". When clicking on that area, in older versions, the file chooser dialog would open.

### Actual Behavior

After upgrading to electron 16.0.0, my electron-based app (Ferdi) crashes

### Testcase Gist URL

_No response_

### Additional Information

http://github.com/getferdi/ferdi
shell/browser/file_select_helper.cc
base::ThreadPool::PostTask(
      FROM_HERE,
      {base::MayBlock(), base::TaskPriority::BEST_EFFORT,
       base::TaskShutdownBehavior::BLOCK_SHUTDOWN},
      base::BindOnce(&DeleteFiles, std::move(temporary_files_)));
}
void FileSelectHelper::CleanUp() {
  if (!temporary_files_.empty()) {
    DeleteTemporaryFiles();
    
    
    Release();
  }
}
bool FileSelectHelper::AbortIfWebContentsDestroyed() {
  if (render_frame_host_ == nullptr || web_contents_ == nullptr) {
    RunFileChooserEnd();
    return true;
  }
  return false;
}
void FileSelectHelper::SetFileSelectListenerForTesting(
    scoped_refptr<content::FileSelectListener> listener) {
  DCHECK(listener);
  DCHECK(!listener_);
  listener_ = std::move(listener);
}
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo>