[Chromium/FileWriter] race condition in FileWriter completion can lead to assert
authorericu@chromium.org <ericu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2011 01:46:08 +0000 (01:46 +0000)
committerericu@chromium.org <ericu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2011 01:46:08 +0000 (01:46 +0000)
commitee999b45bc6ab2ca0bb8b3d5cae12bf72b350071
tree773909374c197f6472d9dbbe372e0585b310f78c
parent6c144ca5c709887c697e1504e193a36de209661e
[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
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/filesystem/file-writer-abort-continue-expected.txt [new file with mode: 0644]
LayoutTests/fast/filesystem/file-writer-abort-continue.html [new file with mode: 0644]
LayoutTests/fast/filesystem/file-writer-abort-depth-expected.txt [new file with mode: 0644]
LayoutTests/fast/filesystem/file-writer-abort-depth.html [new file with mode: 0644]
LayoutTests/fast/filesystem/file-writer-abort-expected.txt [new file with mode: 0644]
LayoutTests/fast/filesystem/file-writer-abort.html [new file with mode: 0644]
LayoutTests/fast/filesystem/resources/file-writer-abort-continue.js [new file with mode: 0644]
LayoutTests/fast/filesystem/resources/file-writer-abort-depth.js [new file with mode: 0644]
LayoutTests/fast/filesystem/resources/file-writer-abort.js [new file with mode: 0644]
LayoutTests/fast/filesystem/resources/file-writer-events.js
Source/WebCore/ChangeLog
Source/WebCore/fileapi/FileWriter.cpp
Source/WebCore/fileapi/FileWriter.h