Chromium Code Reviews| Index: chrome/browser/file_select_helper.cc |
| diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc |
| index 91aa51e1411d34e09b7c3cecd23a8174cc2f082d..1f106cf5e7f7d32fdb2ed37347f0d9c19fe78939 100644 |
| --- a/chrome/browser/file_select_helper.cc |
| +++ b/chrome/browser/file_select_helper.cc |
| @@ -320,6 +320,11 @@ void FileSelectHelper::NotifyRenderFrameHostAndEnd( |
| std::vector<content::FileChooserFileInfo> chooser_files; |
| for (const auto& file : files) { |
| + // Exclude files whose paths can't be converted into WebStrings, since Blink |
| + // won't be able to handle those. |
| + if (file.local_path.AsUTF8Unsafe().empty()) |
|
asanka
2017/04/13 17:21:22
Shall we move this logic to a static function and
Charlie Reis
2017/04/14 19:28:15
Thanks for the suggestion! If we're going to be f
|
| + continue; |
| + |
| content::FileChooserFileInfo chooser_file; |
| chooser_file.file_path = file.local_path; |
| chooser_file.display_name = file.display_name; |