Index: third_party/WebKit/Source/core/page/DragData.cpp |
diff --git a/third_party/WebKit/Source/core/page/DragData.cpp b/third_party/WebKit/Source/core/page/DragData.cpp |
index ddb2cb5fb564cc23d7e32fec1caaaad706c805d9..e828a904917579901cbd09b4794eebe5371b155f 100644 |
--- a/third_party/WebKit/Source/core/page/DragData.cpp |
+++ b/third_party/WebKit/Source/core/page/DragData.cpp |
@@ -83,7 +83,8 @@ void DragData::asFilePaths(Vector<String>& result) const |
{ |
const Vector<String>& filenames = m_platformDragData->filenames(); |
for (size_t i = 0; i < filenames.size(); ++i) { |
- if (!filenames[i].isEmpty()) |
+ // When the content cannot be read, the filenames will all be empty. |
+ if (!m_platformDragData->canReadContent() || !filenames[i].isEmpty()) |
result.append(filenames[i]); |
} |
} |