[Chromium/FileWriter] race condition in FileWriter completion can lead to assert
https://bugs.webkit.org/show_bug.cgi?id=67684
Reviewed by David Levin.
Source/WebCore:
Tests: fast/filesystem/file-writer-abort-continue.html
fast/filesystem/file-writer-abort.html
Track the state of the backend and be prepared for reentrant user
requests. Limit recursion depth to an arbitrary small constant.
* fileapi/FileWriter.cpp: Lots of event-handling changes.
* fileapi/FileWriter.h:
LayoutTests:
* fast/filesystem/file-writer-abort-continue-expected.txt: Added.
* fast/filesystem/file-writer-abort-continue.html: Added.
* fast/filesystem/file-writer-abort-expected.txt: Added.
* fast/filesystem/file-writer-abort.html: Added.
* fast/filesystem/resources/file-writer-abort-continue.js: Added.
* fast/filesystem/resources/file-writer-abort.js: Added.
* fast/filesystem/resources/file-writer-events.js: Fixed a copy-paste error.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96177
268f45cc-cd09-0410-ab3c-
d52691b4dbfc