Bug 1176849 - Make the file picker fatally assert if any of the objects returned by the file picker are not nsIDOMBlob objects. r=baku

This commit is contained in:
Jonathan Watt
2015-06-11 10:58:19 +01:00
parent 483c3b6e23
commit 52b6469fba

View File

@@ -387,8 +387,8 @@ HTMLInputElement::nsFilePickerShownCallback::Done(int16_t aResult)
while (NS_SUCCEEDED(iter->HasMoreElements(&hasMore)) && hasMore) {
iter->GetNext(getter_AddRefs(tmp));
nsCOMPtr<nsIDOMBlob> domBlob = do_QueryInterface(tmp);
NS_WARN_IF_FALSE(domBlob,
"Null file object from FilePicker's file enumerator?");
MOZ_ASSERT(domBlob,
"Null file object from FilePicker's file enumerator?");
if (domBlob) {
newFiles.AppendElement(static_cast<File*>(domBlob.get()));
}