mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Remove unneeded AddRef/Release calls handled by base::Bind
This commit is contained in:
@@ -36,8 +36,6 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
|
||||
auto web_contents = content::WebContents::FromRenderFrameHost(
|
||||
render_frame_host);
|
||||
content::WebContentsObserver::Observe(web_contents);
|
||||
// Add ref that will be released when the dialog is completed
|
||||
AddRef();
|
||||
}
|
||||
|
||||
void ShowOpenDialog(const file_dialog::DialogSettings& settings) {
|
||||
@@ -90,7 +88,6 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
|
||||
const std::vector<content::FileChooserFileInfo>& file_info) {
|
||||
if (render_frame_host_)
|
||||
render_frame_host_->FilesSelectedInChooser(file_info, mode_);
|
||||
Release();
|
||||
}
|
||||
|
||||
// content::WebContentsObserver:
|
||||
|
||||
Reference in New Issue
Block a user