Summary: | Relax restrictions on FileWriter::didWrite calls | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric U. <ericu> | ||||||
Component: | DOM | Assignee: | Eric U. <ericu> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Enhancement | CC: | commit-queue, kinuko, michaeln | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 44358 | ||||||||
Attachments: |
|
Description
Eric U.
2010-10-04 19:20:29 PDT
Created attachment 69731 [details]
Patch
Comment on attachment 69731 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69731&action=review > WebCore/fileapi/FileWriter.cpp:97 > + ec = INVALID_ACCESS_ERR; INVALID_ACCESS_ERR is not defined as a FileError -- maybe INVALID_STATE_ERR? (In reply to comment #2) > (From update of attachment 69731 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=69731&action=review > > > WebCore/fileapi/FileWriter.cpp:97 > > + ec = INVALID_ACCESS_ERR; > > INVALID_ACCESS_ERR is not defined as a FileError -- maybe INVALID_STATE_ERR? It's not really an invalid state; you passed in a bad parameter. Perhaps SYNTAX_ERR? We can always suggest that it go into the spec [which currently doesn't talk about how to respond to a null Blob]. Comment on attachment 69731 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69731&action=review >>> WebCore/fileapi/FileWriter.cpp:97 >>> + ec = INVALID_ACCESS_ERR; >> >> INVALID_ACCESS_ERR is not defined as a FileError -- maybe INVALID_STATE_ERR? > > It's not really an invalid state; you passed in a bad parameter. Perhaps SYNTAX_ERR? We can always suggest that it go into the spec [which currently doesn't talk about how to respond to a null Blob]. If we're given null or undefined where we expect Blob, I think TYPE_MISMATCH_ERR would be applicable. (In reply to comment #4) > (From update of attachment 69731 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=69731&action=review > > >>> WebCore/fileapi/FileWriter.cpp:97 > >>> + ec = INVALID_ACCESS_ERR; > >> > >> INVALID_ACCESS_ERR is not defined as a FileError -- maybe INVALID_STATE_ERR? > > > > It's not really an invalid state; you passed in a bad parameter. Perhaps SYNTAX_ERR? We can always suggest that it go into the spec [which currently doesn't talk about how to respond to a null Blob]. > > If we're given null or undefined where we expect Blob, I think TYPE_MISMATCH_ERR would be applicable. Yeah, that sounds good. I'll change it. Comment on attachment 69731 [details]
Patch
Per discussion in bug. Other than that it seems fine.
Created attachment 69807 [details]
Patch
Comment on attachment 69807 [details] Patch Clearing flags on attachment: 69807 Committed r69140: <http://trac.webkit.org/changeset/69140> All reviewed patches have been landed. Closing bug. |