Merge revision 1023 changes:

- Mac: Fix crash with input element of type "file" when the default file name is empty (issue #823).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1364@1024 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-01-18 17:24:29 +00:00
parent 10df897331
commit c31704d9aa
1 changed files with 4 additions and 2 deletions

View File

@ -529,8 +529,10 @@ bool BrowserWebViewDelegate::ShowFileChooser(std::vector<FilePath>& file_names,
withObject:default_dir
withObject:default_filename];
} else {
[dialog setDirectoryURL:[NSURL URLWithString:default_dir]];
[dialog setNameFieldStringValue:default_filename];
if (default_dir)
[dialog setDirectoryURL:[NSURL URLWithString:default_dir]];
if (default_filename)
[dialog setNameFieldStringValue:default_filename];
result = [dialog runModal];
}