зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1678580
- Check file picker result for errors before showing ConfirmFolderUpload prompt. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D97755
This commit is contained in:
Родитель
75b4e18676
Коммит
d0517b5353
|
@ -484,6 +484,7 @@ HTMLInputElement::nsFilePickerShownCallback::Done(int16_t aResult) {
|
|||
mode == static_cast<int16_t>(nsIFilePicker::modeGetFolder));
|
||||
nsCOMPtr<nsISupports> tmp;
|
||||
nsresult rv = mFilePicker->GetDomFileOrDirectory(getter_AddRefs(tmp));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Show a prompt to get user confirmation before allowing folder access.
|
||||
// This is to prevent sites from tricking the user into uploading files.
|
||||
|
@ -515,8 +516,6 @@ HTMLInputElement::nsFilePickerShownCallback::Done(int16_t aResult) {
|
|||
}
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
RefPtr<Blob> blob = do_QueryObject(tmp);
|
||||
if (blob) {
|
||||
RefPtr<File> file = blob->ToFile();
|
||||
|
|
Загрузка…
Ссылка в новой задаче