Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4258)

Unified Diff: chrome/browser/file_select_helper.cc

Issue 8909015: Implement RunFileChooser for ExtensionHost, so that file input elements work in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/file_select_helper.cc
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
index 1b7eda1b1f94179b2c8259d72e3dc277b4b00dfa..d6d73f75abf0eaf7c7561b0d071dab69eb496386 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -301,8 +301,12 @@ void FileSelectHelper::RunFileChooserOnFileThread(
void FileSelectHelper::RunFileChooserOnUIThread(
const content::FileChooserParams& params) {
- if (!render_view_host_ || !tab_contents_)
+ if (!render_view_host_ || !tab_contents_) {
+ // If the renderer was destroyed before we started, just cancel the
+ // operation.
+ RunFileChooserEnd();
return;
+ }
if (!select_file_dialog_.get())
select_file_dialog_ = SelectFileDialog::Create(this);
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698