Crash after trying to use FileReader in a document with null origin string
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 04:18:00 +0000 (04:18 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 04:18:00 +0000 (04:18 +0000)
commitbfb3b33fd69755e9cf5e15280e9645921f43242b
tree269f113764cc04442cac7cd0d07c2a18bf3bdb1b
parentb57b462c8bad517935a816f76959fe535e0895a8
Crash after trying to use FileReader in a document with null origin string
https://bugs.webkit.org/show_bug.cgi?id=78649

Reviewed by Enrica Casucci.

Source/WebCore:

Test: fast/files/null-origin-string.html

* fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::~FileReaderLoader):
HashMaps don't like empty keys, and they don't like removing keys that have never been added.

LayoutTests:

* fast/files/null-origin-string-expected.txt: Added.
* fast/files/null-origin-string.html: Added.

Dragging files is only implemented on a few platforms. Brought some order to skipped files
for these tests:

* platform/mac/Skipped: Bug 45576 has been fixed long ago; unskip the test.

* platform/efl/Skipped:
* platform/qt/Skipped:
Skipped the new tests.

* platform/gtk-wk2/Skipped:
* platform/mac-wk2/Skipped:
* platform/win-wk2/Skipped:
* platform/wk2/Skipped:
Skipped the new tests, and moved other tests using eventSender.beginDragWithFiles to a
central location. No WK2 port implements these yet, so we needn't maintain the lists
separately.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/files/null-origin-string-expected.txt [new file with mode: 0644]
LayoutTests/fast/files/null-origin-string.html [new file with mode: 0644]
LayoutTests/platform/efl/Skipped
LayoutTests/platform/gtk-wk2/Skipped
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win-wk2/Skipped
LayoutTests/platform/wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/fileapi/FileReaderLoader.cpp