|Summary:||Some FileWriter progress events should be queued|
|Product:||WebKit||Reporter:||Eric U. <ericu>|
|Component:||DOM||Assignee:||Eric U. <ericu>|
|Version:||528+ (Nightly build)|
|Bug Depends on:|
Description Eric U. 2010-12-10 14:42:15 PST
http://www.w3.org/2008/webapps/track/issues/173. When a FileWriter successfully completes a write, currently it: * dispatches a write event * sets readyState to DONE * dispatches a writeend event If you want to start a new write, you can't do it in onwrite, since readyState is still WRITING. Those events should be queued for asynchronous delivery, so that readyState is DONE by the time they get handled. If you set up a new write in onwrite, you'll still run the risk of getting confused by the subsequent writeend from the previous write, but that's detectable. I'll have to look and see what other events should be marked as queued.
Comment 2 David Levin 2011-04-25 10:58:22 PDT
Comment on attachment 88499 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=88499&action=review Not an extensive review as I'm in the middle of something but this should be addressed. > Source/WebCore/fileapi/FileWriter.h:110 > + FileWriterCompletionEventTask(PassRefPtr<FileWriter> fileWriter, FileError::ErrorCode code) Quick comment. This constructor should be private. This should only expose a static create method which returns a PassOwnPtr.
Comment 3 Eric Seidel (no email) 2011-04-26 16:00:06 PDT
Comment on attachment 88499 [details] Patch This seems fine.
Comment 4 Eric Seidel (no email) 2011-04-26 16:00:29 PDT
Comment on attachment 88499 [details] Patch Should be fixed per levin's comemnt though.
Comment 5 Eric U. 2011-04-26 16:02:47 PDT
(In reply to comment #4) > (From update of attachment 88499 [details]) > Should be fixed per levin's comemnt though. Thanks--I'll fix it before I land it.